8.6.3. Extending a Backing Device

When using physical volumes, it happens frequently that a physical volume is full and needs to be extended. One of the advantages of storage pools is the quick and easy administration of the backing devices. The following is intended to show how a backing device can be extended.

The starting point is in many cases a full file system or a full volume group on the client LPAR. In our case, the volume group vg00 created above on LPAR lpar1 has become full:

lpar1 # lsvg -p vg00
vg00:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active            238         0           00..00..00..00..00
lpar1 #

The LUN ID of the physical volume hdisk1 can be determined using lscfg:

lpar1 # lscfg -l hdisk1
  hdisk1           U8205.E6C.05E4E5Q-V3-C5-T1-L8300000000000000  Virtual SCSI Disk Drive
lpar1 #

The LUN ID is 8300000000000000, the associated vscsi adapter has slot number 5 (V3-C5-T1). Next, we need the associated virtual I/O server, which can be found out from the output of “lpar lsvslot”:

$ lpar lsvslot lpar1
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   scsi/client    1      remote: ms05-vio1(1)/25
$

As expected, there is a virtual SCSI client adapter in slot 5 (there is only one here) and the associated virtual I/O server is ms05-vio1 with a vhost adapter in slot 25.

A list of the vhost adapters of the virtual I/O server ms05-vio1 with the command “vios lsvscsi” and the search for slot number 25 results in the adapter vhost0:

$ vios lsvscsi ms05-vio1
SVSA    SLOT  CLIENT              LUNS
vhost0  C25   lpar1(3)            5
vhost1  C28   lpar2(4)            2
vhost2  C31   lpar3(5)            2
$

Next we need the name of the backing device for the LUN ID we are looking for 8300000000000000.

$ vios lsvscsi ms05-vio1 vhost0
VTD      STATUS     BACKING                             BDPHYSLOC  MIRRORED  LUN
vtopt0   Available  /var/vio/VMLibrary/AIX710506_2.iso  -          N/A       0x8100000000000000
vtscsi0  Available  lpar1_hd00                          -          N/A       0x8200000000000000
vtscsi5  Available  bd001                               -          N/A       0x8300000000000000
lpar1_hd02  Available  bd002                            -          N/A       0x8400000000000000
lpar1_hd03  Available  bd003                            -          N/A       0x8400000000000000
$

The backing device we are looking for is bd001.

In order to extend the backing device bd001, we need some space in the storage pool:

$ vios lssp ms05-vio1
POOL      TYPE    SIZE       FREE       ALLOC      BDS
rootvg    LVPOOL  558.00 GB   68.00 GB  512.00 MB  0
testpool  LVPOOL    9.93 GB    6.93 GB    8.00 MB  3
$

We increase the backing device bd001 by 1 GB. The command to change the backing device is “vios chbdsp” (change backing-device in storage pool):

$ vios chbdsp ms05-vio1 testpool bd001 +1g
$

After the backing device has been extended, the logical volume manager in the client LPAR must be informed, that the size of physical volumes in one of the volume groups has changed. The command for this is “chvg -g“:

lpar1 # chvg -g vg00
lpar1 #

After the extension of the physical volume, there is again available free space in the volume group:

lpar1 # lsvg -p vg00
vg00:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active            494         256         00..00..58..99..99
lpar1 #

Note: It is not possible to reduce the size of a backing device!