VIO SERVER HOWTO

Contents

  1. Run IOS commands as root

IOS - Information and Maintenance

  1. List all ioscli commands
  2. IOS Version
  3. Apply IOS Fixes
  4. Reboot the VIO Server

Virtual Devices: Storage

  1. List unmapped disks
  2. List all Disk Mappings
  3. Create a Virtual SCSI Host Adapter
  4. Remove a Virtual SCSI Host Adapter
  5. Assign a Disk/LV to a Virtual SCSI Host Adapter
  6. Unassign a Disk/LV from a Virtual SCSI Host Adapter

Virtual Devices: Network

  1. List Shared Ethernet Adapters
  2. Create a Shared Ethernet Adapter
  3. List Links on Physical Ethernet Adapters
  4. Set an local IP Address
  5. Remove an local IP Address

 

1. Run IOS commands as root

According to IBM you should never work as root on VIO servers. However, if you login as user padmin and type

 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

 root@vios# /usr/ios/cli/ioscli lsmap -all

If you set an alias

 alias i=/usr/ios/cli/ioscli

you could even type

 root@vios# i lsmap -all

 

IOS - Information and Maintenance

1. List all ioscli commands

 $ help

You can type

 $ help <command>

to display a command's syntax, e.g

 $ help lsmap
Usage: lsmap {-vadapter ServerVirtualAdapter | -plc PhysicalLocationCode |
-all} [-type BackingDeviceType ... | -net]
[-field FieldName ...] [-fmt delimiter]
Displays the mapping between physical and virtual devices.

-all Displays mapping for all the server virtual adapter
devices.

-vadapter Specifies the server virtual adapter device
by device name.

-plc Specifies the server virtual adapter device
by physical location code.

-type Specifies to display virtual devices whose backing
device matches the type given.

-net Specifies supplied device is a virtual server
Ethernet adapter.

-field Specifies a list of fields to be displayed.

-fmt Divides output by a user-specified delimiter.

 

2. IOS Version

 $ ioslevel
1.5.2.1-FP-11.1

 

3. Apply IOS Fixes

Put the IOS fixes somewhere in a local directory or on an NFS server (e.g. /mnt/iosfixes). Then run

 $ updateios -dev /mnt/iosfixes -accept

 

4. Reboot the VIO Server

 $ shutdown -restart

 

Virtual Devices: Storage

1. List unmapped disks

 $ 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.

 $ lspv -free | grep vpath

 

2. List all Disk Mappings

 $ 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

 

VIOS Profile: Add Virtual SCSI Adapter

3. Create a Virtual SCSI Host Adapter

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.

You can do these steps dynamically to avoid a restart of the VIO server. Use the Dynamic Logical Partitioning option for that. If you go for the dynamic option don't forget to do the same assignments in the profiles aswell, otherwise your LPAR loses all storage after a new start of the VIOS!

After dynamically adding the server hostadapters you have to rerun the configuration mamager before you can see the new vhost device:

 $ cfgdev

 

4. Remove a Virtual SCSI Host Adapter

 $ 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.

 

5. Assign a Disk/LV to a Virtual SCSI Host Adapter

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:

 # default mapping device
$ mkvdev -vdev lpar21_lv03 -vadapter vhost1
vtscsi19 available

# custom mapping device
$ mkvdev -vdev lpar21_lv03 -dev vtdisk21_lv03 -vadapter vhost1
vtdisk21_lv03 available

 

6. Unassign a Disk/LV from a Virtual SCSI Host Adapter

 $ rmvdev -vtd vtscsiXX

 

Virtual Devices: Network

1. List Shared Ethernet Adapters

 $ lsmap -all -net
SVEA Physloc
------ --------------------------------------------
ent12 U9117.570.65E12FB-V2-C20-T1

SEA ent13
Backing device ent3
Physloc U7311.D20.651372C-P1-C01-T2

 

2. Create a Shared Ethernet Adapter

To create a Shared Ethernet Adapter (SEA) you need:

  • a physical adapter as backend: <PHYS>
  • a virtual adapter as defined in the VIOS' profile: <VIRT>
  • an internal VLAN ID: <VLAN>
If you use the Shared Ethernet Adapter Failover capability of recent IOS releases you also need
  • a second virtual adapter as defined in the VIOS' profile: <CONT>
for the control channel:
 # simple:
$ 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>

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

 

3. List Links on Physical Ethernet Adapters

 $ 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

 

4. Set an local IP Address

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>

 

5. Remove an local IP Address

If you want to remove the IP configuration from en0, type

 $ rmtcpip -interface en0

Comentarios