7.5.1. Adding a Virtual SCSI Adapter

If a virtual SCSI adapter is to be added to an active LPAR, the LPAR must have an active RMC connection to an HMC. A free virtual slot is required for the virtual SCSI adapter. Since a virtual SCSI client adapter always works together with a virtual SCSI server adapter on a virtual I/O server, a server adapter must always be created on a virtual I/O server for each client adapter. A free virtual slot is also required on the virtual I/O server.

Which virtual slots are currently available on the client LPAR can be determined using “lpar lsvslot” (list virtual slots):

$ lpar lsvslot aix22
SLOT  REQ  ADAPTER_TYPE   STATE  DATA
0     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
1     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
5     No   eth            1      PVID=100 VLANS= ETHERNET0 1DC8DB485D1E
10    No   fc/client      1      remote: ms03-vio1(1)/5 c05076030aba0002,c05076030aba0003
20    No   fc/client      1      remote: ms03-vio2(2)/4 c05076030aba0000,c05076030aba0001
$

Here, for example, the virtual slot 11 is still available.

The available virtual slots on a virtual I/O server can be determined in the same way, here for ms03-vio1:

$ lpar lsvslot ms03-vio1
SLOT  REQ  ADAPTER_TYPE   STATE  DATA
0     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
1     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
5     No   fc/server      1      remote: aix22(5)/10
11    No   eth            1      PVID=900 VLANS= ETHERNET0 1DC8DB485D0B
20    No   eth            1      PVID=1 VLANS= ETHCTRL 1DC8DB485D14
21    No   eth            1      TRUNK(1) IEEE PVID=1 VLANS=100,200 ETHERNET0 1DC8DB485D15
22    No   eth            1      TRUNK(1) IEEE PVID=2 VLANS=150,250 ETHERNET0 1DC8DB485D16
125   No   fc/server      1      remote: aixsap01(9)/10
181   No   fc/server      1      remote: aixdbp02(11)/10
182   No   fc/server      1      remote: aixdbi02(13)/10
$

Among other things, the virtual slot 111 would be available here.

The command “lpar addscsi” (add virtual SCSI adapter) is used to create a virtual SCSI client adapter for an LPAR. In addition to the client LPAR, the virtual I/O server for the virtual SCSI server adapter must also be specified:

$ lpar addscsi aix22 11 ms03-vio1 111
aix22: slot 11 -> ms03-vio1/111 added by DLPAR operation
aix22: slot 11 -> ms03-vio1/111 added to current profile (standard)
ms03-vio1: slot 111 -> aix22/11 added by DLPAR operation
$

The output of the command shows, that a virtual SCSI client adapter is first added via a DLPAR operation. Next, the current profile of the LPAR is adjusted and then the associated virtual SCSI server adapter is created on the virtual I/O server. The command automatically creates both adapters. If desired, this can be prevented, by using the appropriate options (“-cclient adapter only).

Finding a free virtual slot number on the virtual I/O server can be tedious in larger environments, since a virtual I/O server can easily have several hundred virtual adapters. In principle, the virtual slot number on the virtual I/O server is irrelevant. In addition, there is no guarantee that the virtual slot number on the virtual I/O server will remain the same during an LPM operation. (The virtual slot 111, for example, could already be in use on the target virtual I/O server of the LPM operation.) If you simply omit the specification of the virtual slot number on the virtual I/O server in the “lpar addscsi” command, then a free slot number is automatically determined on the virtual I/O server:

$ lpar addscsi aix22 11 ms03-vio1
aix22: slot 11 -> ms03-vio1/33 added by DLPAR operation
aix22: slot 11 -> ms03-vio1/33 added to current profile (standard)
ms03-vio1: slot 33 -> aix22/11 added by DLPAR operation
$

Here, for example, slot number 33 was used on the virtual I/O server.

If you do not want to specify the slot number on the client LPAR either, you can omit it as well. A free virtual slot number for the virtual SCSI client adapter is then determined for the client. Usually this is the first free slot number. However, this can be configured.

AIX uses the name vscsi for the device name of a virtual SCSI client adapter. After adding a virtual SCSI client adapter to an LPAR, the associated new device is not automatically recognized by the operating system.

aix22 # lscfg -l vscsi*
lscfg: device vscsi* not found.
aix22 #

The error message clearly shows that the adapter created above in slot 11 is not yet known to the operating system.

After adding a virtual SCSI client adapter to a client LPAR, the operating system of the client LPAR must first recognize the new client adapter. In the case of AIX as the operating system, the config manager cfgmgr must be started:

aix22 # cfgmgr -v
cfgmgr is running in phase 2
----------------

----------------
Attempting to configure device 'vscsi0'
Time: 0 LEDS: 0x25b3
Invoking /usr/lib/methods/cfg_vclient -l vscsi0
Number of running methods: 1
----------------
Completed method for: vscsi0, Elapsed time = 1
Return code = 0
*** no stdout ****
*** no stderr ****

aix22 #

The output shows that the adapter vscsi0 was recognized. However, no child devices are listed. This is because the virtual SCSI client and virtual SCSI server adapter have been created, but no target devices have yet been assigned to the virtual SCSI server adapter.

If an LPAR has no active RMC connection or is not active, a virtual SCSI adapter can only be added to one of the profiles of the LPAR. This is always the case, for example, if the LPAR has just been created and has not yet been activated and installed.

In this case, the option “-p” together with a profile name has to be used with the commands shown. Which profiles an LPAR has, can easily be shown by using “lpar lsprof” (list profiles):

$ lpar lsprof aix22
NAME                      MEM_MODE  MEM   PROC_MODE  PROCS  PROC_COMPAT
standard                  ded       7168  ded        2      default
last*valid*configuration  ded       7168  ded        2      default
$

(The last active configuration is stored in the profile with the name last*valid*configuration.)

The virtual adapters defined in the profile standard, can be displayed by specifying the profile name with “lpar lsvslot“:

$ lpar -p standard lsvslot aix22
SLOT  REQ  ADAPTER_TYPE   DATA
0     Yes  serial/server  remote: (any)/any connect_status= hmc=1
1     Yes  serial/server  remote: (any)/any connect_status= hmc=1
5     No   eth            PVID=100 VLANS= ETHERNET0
10    No   fc/client      remote: ms03-vio1(1)/5 c05076030aba0002,c05076030aba0003
20    No   fc/client      remote: ms03-vio2(2)/4 c05076030aba0000,c05076030aba0001
$

When adding the adapter, only the corresponding profile name has to be given, otherwise the command looks exactly as shown in the examples above:

$ lpar -p standard addscsi aix22 11 ms03-vio1
aix22: slot 11 -> ms03-vio1 slot 33 added to current profile (standard)
ms03-vio1: slot 33 -> aix22 slot 11 added by DLPAR operation
$

In order to make the new adapter in slot 11 available, the LPAR must be reactivated, using the profile standard.