De acuerdo con IBM nunca se debe trabajar como root en servidores VIO. Sin embargo, si inicia la sesión como usuario padmin y se escribe:
$ oem_setup_env
se obtienen las credenciales de root (sin que haya pedido contraseña).
Por defecto los comandos ioscli no están disponibles para el usuario root. Todos los comandos ioscli de hecho son llamadas a /usr/ios/cli/ioscli
con el comando como argumento. Puede ver esto si se lista los comandos alias del usuario padmin.
Sabiendo esto, puede utilizar todos los comandos ioscli como usuario root mediante la adición de /usr/ios/cli/ioscli
. En lugar de “lsmap -all
” debería escribir
[root@afi-vio-01-prd ~]# /usr/ios/cli/ioscli lsmap -all
Si establece un alias
alias i=/usr/ios/cli/ioscli
podrá incluso escribir
[root@afi-vio-01-prd ~]# i lsmap -all
Si se quiere saber cual es el comando AIX detrás de un coando que haya ejecutado padmin, puede utilizar un modo de especial de debug:
$ export CLI_DEBUG=33
Esto es lo que muestra el comando lsnports
en este modo:
$ lsnports AIX: "/usr/lib/methods/viosmgr -t npiv -f query_fc_ports >/dev/null" name physloc fabric tports aports swwpns awwpns fcs0 U5802.001.00H4971-P1-C5-T1 1 64 62 2048 2045 fcs2 U78AA.001.WZSG4XT-P1-C5-T1 1 64 64 2048 2047
$ help
Puede escribir
$ help <comando>
Para mostrar la sintaxis de un comando, por ejemplo
$ 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 [-vadapter ServerVirtualAdapter]} Displays the mapping between physical and virtual devices. -all Displays mapping for all the server virtual adapter devices. Defaults to VSCSI adapter devices. -clustername Specifies the cluster name. -hostname Specifies the host name. -vadapter Specifies the server virtual adapter device by device name. -plc Specifies the server virtual adapter device by physical location code. -vtd Specifies the (AMS)Active Memory Sharing Paging Device to be displayed. -type Specifies to display virtual devices whose backing device matches the type given. -net Specifies supplied device is a virtual server Ethernet adapter. -npiv Displays NPIV binding information. -ams Displays (AMS)Active Memory Sharing paging space device information. -field Specifies a list of fields to be displayed. -fmt Divides output by a user-specified delimiter.
$ ioslevel 2.2.0.10-FP-24
Coloque los fixes del IOS en un directorio local o en un servidor NFS. (ej. /mnt/iosfixes). Entonces ejecute:
$ updateios -dev /mnt/iosfixes -accept
Solo debe de ser con el updateios
.
$ shutdown -restart
$ lspv -free NAME PVID SIZE(megabytes) hdisk24 none 8631 hdisk25 none 8631 hdisk26 none 8631 hdisk27 none 8631
$ lspv -free | grep vpath
$ lsmap -all SVSA Physloc Client Partition ID --------------- -------------------------------------------- ------------------ vhost1 U9117.570.65E12FB-V1-C102 0x0000000a 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
This has to done on the HMC for the profile of the VIO server: You create a new Virtual SCSI Host-Adapter and assign it only to your client LPAR.
The same slot ID should then be assigned to a new client adapter in the client LPAR's profile.
After dynamically adding the server hostadapters you have to rerun the configuration mamager before you can see the new vhost device:
$ cfgdev
$ rmdev -dev vhostX [ -recursive ]
The option »-recursive« can be used to remove all still attached child devices.
Then remove the adapters dynamically from the VIO server aswell as from the VIOS' profile.
To map hdisk22 to vhost1 just type
$ mkvdev -vdev hdisk22 -vadapter vhost1 vtscsi19 available
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:
$ mkvdev -vdev hdisk22 -dev vthdisk22_barney -vadapter vhost1 vthdisk22_barney available
If you use LVs rather than whole disks or LUNs the same rules apply:
# Asignación predeterminada de un dispositivo $ mkvdev -vdev lpar21_lv03 -vadapter vhost1 vtscsi19 available # Asignación personalizada de un dispositivo $ mkvdev -vdev lpar21_lv03 -dev vtdisk21_lv03 -vadapter vhost1 vtdisk21_lv03 available
$ rmvdev -vtd vtscsiXX
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.
This has to done on the HMC for the profile of the VIO server: You create a new Virtual Server Fibre Channel adapter and assign it to only one client LPAR.
$ lsmap -all -npiv Name Physloc ClntID ClntName ClntOS ------------- ---------------------------------- ------ -------------- ------- vfchost0 U8203.E4A.05A6DD1-V1-C41 3 mylpar6 AIX 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 Name Physloc ClntID ClntName ClntOS ------------- ---------------------------------- ------ -------------- ------- vfchost1 U8203.E4A.05A6DD1-V1-C43 4 mylpar8 AIX 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
The same slot ID should then be assigned to a new Client Fibre Channel adapter in the client LPAR's profile.
NPIV = N_port ID Virtualization
$ 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
$ vfcmap -vadapter vfchost0 -fcp fcs1
There isn't a separate command for this action - you just leave the argument after -fcp empty:
$ vfcmap -vadapter vfchost0 -fcp
$ lsmap -all -net SVEA Physloc ------ -------------------------------------------- ent12 U9117.570.65E12FB-V2-C20-T1 SEA ent13 Backing device ent3 Physloc U7311.D20.651372C-P1-C01-T2
Para crear un Shared Ethernet Adapter (SEA) se necesita:
Si se va a usar un Shared Ethernet Adapter Failover (disponible en las recientes liberaciones del IOS) se necesita admemás
para el control channel:
# Shared Ethernet Adapter Sencillo: $ mkvdev -sea <PHYS> -vadapter <VIRT> -default <VIRT> -defaultid <VLAN> # Shared Ethernet Adapter Failover: $ mkvdev -sea <PHYS> -vadapter <VIRT> -default <VIRT> -defaultid <VLAN> -attr ha_mode=auto ctl_chan=<CONT>
Ejemplo: Para crear un Shared Ethernet Adapter por encima de un adaptador virtual ent11 usando la VLAN 20, el adaptador físoco ent2 como backend, y el adaptador virtual ent13 para el control channel, teclee:
$ mkvdev -sea ent2 -vadapter ent11 -default ent11 -defaultid 20 -attr ha_mode=auto ctl_chan=ent13
$ netstat -cdlistats | grep -Ei "\(ent|media|link status" ETHERNET STATISTICS (ent3) : Link Status : Up Media Speed Selected: 100 Mbps Full Duplex Media Speed Running: 100 Mbps Full Duplex
To configure an local IP 192.168.1.2 address to en0 use
$ mktcpip -hostname <HOSTNAME> \ -inetaddr 192.168.1.2 \ -interface en0 -start \ -netmask 255.255.255.0 \ -gateway <GATEWAY>
If you want to remove the IP configuration from en0, type
$ rmtcpip -interface en0