Odm Get Commands

8
ODM GET COMMANDS i am having MPIO on vio , i use lspath display 1 of the SAN disk in vio server. # lspath -l hdisk12 -H -F "name parent connection path_id" name parent connection path_id hdisk12 fscsi0 500507630700067a,4060400500000000 0 hdisk12 fscsi0 50050763070b067a,4060400500000000 1 hdisk12 fscsi1 500507630710067a,4060400500000000 2 hdisk12 fscsi1 50050763071b067a,4060400500000000 3 how to explain connection and path_id AIX: odmget examples odmget -q"name=hdisk0" CuDv # get ODM object in the CuDv that describes hdisk0 disk device odmget -q"name=hdisk0 and attribute=pvid" CuAt # get ODM object that stores the PVID odmget -q"value3=hdisk0" CuDvDr # get major,minor number of special file for hdisk0 odmget -q"name=rootvg" CuDep # query ODM class to identify all LVs that belong to rootvg odmget -q"parent=rootvg" CuDv # the same as previous command Can be usefull when troubleshooting LVM related problems HOWTO: Setup Dual VIOS VSCSI and MPIO User Rating: / 41 Poor Best This article is based on a cheat sheet I use when setting up virtual scsi client partitions. Just enough detail is provided to get the job done. The testing I leave up to you! Rate

description

AIX

Transcript of Odm Get Commands

ODM GET COMMANDSi am having MPIO on vio , i use lspath display 1 of the SAN disk in vio server.# lspath -l hdisk12 -H -F "name parent connection path_id"name parent connection path_id

hdisk12 fscsi0 500507630700067a,4060400500000000 0hdisk12 fscsi0 50050763070b067a,4060400500000000 1hdisk12 fscsi1 500507630710067a,4060400500000000 2hdisk12 fscsi1 50050763071b067a,4060400500000000 3

how to explain connection and path_idAIX: odmget examplesodmget -q"name=hdisk0" CuDv# get ODM object in the CuDv that describes hdisk0 disk device

odmget -q"name=hdisk0 and attribute=pvid" CuAt# get ODM object that stores the PVID

odmget -q"value3=hdisk0" CuDvDr# get major,minor number of special file for hdisk0

odmget -q"name=rootvg" CuDep# query ODM class to identify all LVs that belong to rootvg

odmget -q"parent=rootvg" CuDv# the same as previous command

Can be usefull when troubleshooting LVM related problemsHOWTO: Setup Dual VIOS VSCSI and MPIO

Top of FormUser Rating:/41PoorBestBottom of FormThis article is based on acheat sheetI use when setting up virtual scsi client partitions. Just enough detail is provided to get the job done. The testing I leave up to you!The basis of setting up dual VIO servers will always be:* Setup First Virtual I/O Server*Test Virtual I/O setup* Setup Second Virtual I/O Server* Test Virtual I/O setupOnce the Virtual I/O Servers are prepared focus moves to the client partitions* Setup client partition(s).* Test client stabilityIn the following - no hints are provided on testing. Thus, not 4 parts, but two parts: setup VIOS; setup client. The setup is based on a DS4300 SANStorage server. Your attribute and interface names may be different.Setting up Multiple Virtual I/O Servers(VIOS)The key issue is the LUNs exported from the SAN environment must always be available to any VIOS that is going to provide the LUN via the VirtualSCSI interfaceto Virtual SCSI client partitions (or client LPAR). The hdisk attribute that must be set on each VIOS for each LUN that will be used for a MPIO configuration isreserve_setting. When there are problems the first thing I check is whether the disk attributereserve_settinghas been set tonone.But it is not just this one setting. Forfailoverwe also need setup the adapters. Note: to change any of these attributes the adapters and disks need to be in a defined state - OR - you make the changes to the ODM and reboot. This second, i.e. reboot, option is required when you cannot get the disks and/or adapters offlined (varyoffvg followed by several rmdev -l commands).To make an ODM change just add the parameter -P to the chdev -l commands below. And be sure to not use rmdev -d -l as this just removes the device definition from the ODM and you have to restart.Setup adaptersThis example is using an IBM DS4000storagesystem. Your adapter names may be different.First, make sure the disks are offline. If no clients are using the disks this is easy, otherwise you must get the client partition tovaryoffvgthe disks, and usermdev -lto each disk/LUN. Once the disks are not being used the following commands bring the disks andadaptersoffline (or into a defined state). The commandcfgmgrwill bring them back online with the new settings active.Do not run cfgmgr untilAFTERthe disksattributeshave been set.Note: I have used the command oem_setup_env to switch from user padmin to root. Below I will switch back to padmin (note $ or # prompt for commands for padmin and root, respectively).# rmdev -l dar0 -R# rmdev -l fscsi0 -RUpdate the adapter settings:# chdev -l fscsi0 -a fc_err_recov=fast_fail# chdev -l fscsi0 -a dyntrk=yesSetup DisksOn my system the disks the first four disks are local and I have 8 LUNs that I want to makeMPIO readyfor the clients. So, with both VIO servers having the disks offline, or only one VIO server active, it is simple to get the disks setup for no_reserve. I also add that I want the VIO server to be aware of thepvidthe clients put, or modify on these disks. Finally, I make sure the client sees the disk as "clean".# for i in 4 5 6 7 8 9 10 11> do> chdev -l hdisk$i -a pv=yes> chdev -l hdisk$i -a reserve_policy=no_reserve> chpv -C hdisk$i ## this "erases the disk so be careful!> doneNow I can activate the disks again using:# cfgmgrSetup ClientsI assume you already know how to configure VSCI clients (you have already configured at least two VIO Servers!!) so I'll skip over the commands on the HMC for configuring the client partition.Once the client LPAR has been configured - but before it is activated you need to map the LUNs available on the VIOS to the client. The command to do this is mkvdev.Assuming that the VIOS are setup to have identical disk numbering any command you use on the first VIOS can be repeated on the second VIOS.$ mkvdev -vdev hdisk4 -vadapter vhost0vtscsi0 AvailableYou can verify the virtual target (vt) mapping using the command:$ lsmap -vadapter vhost 0Repeat these commands on the other VIOS(s) and make sure they are all connected to the same VSCSI client (VX-TY). TheVXpart is the most important - that signifies that it is the same client partition (X== client partiion number). TheTYis the Virtual I/O bus slot number and this will be different for each mapping. TheTYpart signify the multiple paths.The easiest way to setup the client drivers is to just install it. The AIX installation sees the MPIO capability and install the drivers and creates the vpaths. After AIX reboots there are few changes we want to make sure AIX recivers automatically incase one of the VIO servers goes offline, or loses connection with the SAN.On the clientFor each LUN coming from the SAN do:# chdev -l hdiskX -a hcheck_mode=nonactive -a hcheck_interval=20 \ -a algorithm=failover -PAs this is probably including your rootvg disks a reboot is required.MPIO:

Included as part of AIX at no charge. Packaged as a kernel extension and multipathing module (PCM, Path Control Module). Eachstorage devicerequires a PCM. PCM is storage vendor supplied code that gets control from the device driver to handle the path management.

With AIX and multipathing (on IBM storage) we have the following options:-classic SDD:(ODM definitions: ibm2105.rte, SDD driver: deviceis.sdd.53.rte)-default PCM (MPIO):it comes with AIX (it is activated only if there are no SDD ODM definitions)-SDDPCM:SDD version which uses MPIO and has same commands as SDD (ODM def: devices.fcp.disk.ibm2105.mio.rte, SDDPCM driver:devices.sddpcm.53.rte)

MPIO is installed as part of the base OS. Paths are discovered during system boot (cfgmgr) and disks are created from paths at the same time. No further configuration is required.

By default fail_over is set to algorithm. To change it to round robin, first change reservation policy and then algorithm:chdev -l hdiskX -a reserve_policy=no_reservechdev -l hdiskX -a algorithm=round_robin

smitty mpio

mkpath -l hdiskX -p fscsiY add extra path that are attached to an adapterlspath lists paths (lspath -l hdisk46)lspath -l hdisk44 -H -F "name path_id parent connection status"shows many infochpath changing path state (enabbled, disabled)chpath -s enabled -l hdisk -p vscsi0it will set the path to enabled statusrmpath -dl hdiskX -p fcsiY dynamically remove all paths under a parent adapter (-d: deletes, without it puts it to define state) (The last path cannot be removed, the command will fail if you try to remove the last path)

rmpath -dl hdisk3 -p fscsi0 -w 50060e8000c3baf4,2000000000000