Академический Документы
Профессиональный Документы
Культура Документы
html
unixwerk > AIX > Howtos > VIOS March 25, 2012
unixwerk V I O S e r v e r H o w to
Contents
AIX
1. Run IOS commands as root
BSD 2. What is the AIX command behind an ioscli command?
oem_setup_env
you get the root credentials (without even been asked for a password).
By default the ioscli commands are not available for the root user. All ioscli commands are in fact calls of /usr/ios/cli/ioscli with the
command as argument. You see this if you list the aliases of the padmin user.
Knowing this you can use all ioscli commands as user root by appending /usr/ios/cli/ioscli. Instead of lsmap -all you would type
alias i=/usr/ios/cli/ioscli
$ export CLI_DEBUG=33
$ lsnports
AIX: "/usr/lib/methods/viosmgr -t npiv -f query_fc_ports >/dev/null"
name physloc fabric tports aports swwpns awwpns
$ help
$ help <command>
$ help lsmap
Usage: lsmap {-vadapter ServerVirtualAdapter | -plc PhysicalLocationCode |
-all} [-type BackingDeviceType ... | -net | -npiv ]
[-field FieldName ...] [-fmt delimiter]
lsmap -ams {-vtd PagingDevice | -all}
[-type BackingDeviceType ... ]
[-field FieldName ...] [-fmt delimiter]
lsmap -clustername ClusterName {-all | -hostname}
2. IOS Version
$ ioslevel
2.2.0.10-FP-24
Put the IOS fixes somewhere in a local directory or on an NFS server (e.g. /mnt/iosfixes). Then run
$ shutdown -restart
$ lspv -free
NAME PVID SIZE(megabytes)
hdisk24 none 8631
hdisk25 none 8631
hdisk26 none 8631
hdisk27 none 8631
Warning: If you use vendor specific device drivers (such as the SDD or EMC drivers) you see all hdisks as free. You have to limit the list to your
logical devices, e.g.
$ lsmap -all
VTD vtscsi1
LUN 0x8100000000000000
Backing device hdisk6
Physloc U7879.001.DQDHXYN-P1-C4-T1-W50050763041302AA-L4021400000000000
VTD vtscsi8
LUN 0x8200000000000000
Backing device hdisk14
Physloc U7879.001.DQDHXYN-P1-C4-T1-W50050763041302AA-L4031400100000000
$ cfgdev
The VIO server assigns the next free number (19 here) and creates the mapping device vtscsi19. But you can specify your own name for the mapping
device by making use of the -dev option:
If you use LVs rather than whole disks or LUNs the same rules apply:
IBM introduced the support of NPIV technology with VIOS (Virtual I/O Sever) 2.1 with a client AIX running either AIX 5.3 TL9 or later, or AIX 6.1 TL2 or
later, or AIX 7.1. Earlier releases are not supported.
The same slot ID should then be assigned to a new Client Fibre Channel adapter in the client LPAR's profile.
Status:LOGGED_IN
FC name:fcs1 FC loc code:U789C.001.DQDH231-C3-T2
Ports logged in:2
Flags:a<LOGGED_IN,STRIP_MERGE>
VFC client name:fcs0 VFC client DRC:U8203.E4A.05A6DD1-V3-C41-T1
Status:LOGGED_IN
FC name:fcs1 FC loc code:U789C.001.DQDH231-C3-T2
Ports logged in:2
Flags:a<LOGGED_IN,STRIP_MERGE>
VFC client name:fcs0 VFC client DRC:U8203.E4A.05A6DD1-V4-C43-T1
$ lsnports
name physloc fabric tports aports swwpns awwpns
fcs0 U789C.001.DQDH231-P1-C2-T1 1 64 64 2048 2047
fcs1 U789C.001.DQDH231-P1-C2-T2 1 64 62 2048 2043
There isn't a separate command for this action - you just leave the argument after -fcp empty:
SEA ent13
Backing device ent3
Physloc U7311.D20.651372C-P1-C01-T2
If you use the Shared Ethernet Adapter Failover capability of recent IOS releases you also need
# simple:
$ mkvdev -sea <PHYS> -vadapter <VIRT> -default <VIRT> -defaultid <VLAN>
Example: To create a Shared Ethernet Adapter on top of an virtual adapter ent11 using VLAN 20, the physical adapter ent2 as backend, and the virtual
adapter ent13 for the control channel type:
$ mkvdev -sea ent2 -vadapter ent11 -default ent11 -defaultid 20 -attr ha_mode=auto ctl_chan=ent13