8.6.9. Deleting a File Storage Pool

The “vios rmsp” command is used to delete a file storage pool. However, as in the case of deleting a logical volume storage pool, it should be ensured that the backing devices are not in use or are no longer required. We will demonstrate this briefly with the file storage pool filepool.

First we generate the list of the backing devices of the storage pool:

$ vios lsbdsp ms05-vio1 filepool
BDNAME  SIZE       VTD      SVSA
bd001     1.00 GB  vtscsi5  vhost0
$

There is only one backing device (bd001) which is assigned to the adapter vhost0. The associated client LPAR can be determined with the command “vios lsvscsi“:

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

The backing devices used by the client LPAR lpar1 are:

$ 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  /var/vio/storagepools/filepool/.bd001  -          N/A       0x8300000000000000
$

The backing device bd001 has the LUN ID 0x8300000000000000. On the AIX LPAR, we determine the associated physical volume using the lscfg command:

lpar1 # lscfg -l hdisk\*
  hdisk0           U8205.E6C.05E4E5Q-V3-C5-T1-L8200000000000000  Virtual SCSI Disk Drive
  hdisk1           U8205.E6C.05E4E5Q-V3-C5-T1-L8300000000000000  Virtual SCSI Disk Drive
lpar1 #

The associated physical volume is hdisk1! A quick check with lspv shows that the hdisk1 is not in use:

lpar1 # lspv
hdisk0          00ecafe541e13592                    rootvg          active     
hdisk1          none                                None                       
lpar1 #

The physical volume can therefore be removed without any problems:

lpar1 # rmdev -dl hdisk1
hdisk1 deleted
lpar1 #

The backing device can now be deleted on the virtual I/O server. The mapping is removed at the same time:

$ vios rmbdsp ms05-vio1 filepool bd001
$

The now empty file storage pool can then be removed, the command is “vios rmsp“:

$ vios rmsp ms05-vio1 filepool
$

A short check shows that the file storage pool filepool is no longer available:

$ vios lssp ms05-vio1
POOL    TYPE    SIZE    FREE   ALLOC  BDS
rootvg  LVPOOL  571392  69632  512    0
$