How To Remove VSCSI Disk
How To Remove VSCSI Disk
How To Remove VSCSI Disk
Table of Contents
Overview....................................................................................................................................................... 1
Removing a Physical Volume from a Volume Group.....................................................................................1
1. Deallocating the physical partitions........................................................................................................ 1
2. Remove the physical volume from the volume group............................................................................3
3. How to map the virtual scsi disk (on the client partiton) to the physical disk (on the server partition)....3
4. Remove the virtual scsi disk definition from the device configuration database on the VIO client.........5
5. Remove the backing device on the VIO server......................................................................................5
Related Documentation................................................................................................................................. 6
Overview
This document describes the procedure to remove a virtual disk in a volume group on a Virtual I/O Client, to
map the virtual scsi disk to its corresponding backing device, and to remove the backing device from the
Virtual I/O Server. Please, read the entire document before proceeding.
This document applies to AIX version 5.3 and above.
In a Virtual I/O environment, the physical devices are allocated to the VIO server. When there is a hardware
failure (disk or adapter may go bad) on the VIO server, unless the VIO server has some type of redundancy,
that will have an impact on the VIO client whose virtual disks are being served by the failing device. The
impact may be loss of connectivity to the virtual scsi disks, unless there is some type of redundancy (MPIO
or LVM mirroring) on the client partition.
This document does NOT apply to any of the following environments:
Example
# lspv -l hdisk4
hdisk4:
LV NAME LPs
fslv00
loglv00 1
rawlv
30
PPs
2
1
30
DISTRIBUTION
MOUNT POINT
2
00..02..00..00..00
/test
00..01..00..00..00
N/A
00..30..00..00..00
N/A
If the hdisk name no longer exists, and the disk is identifiable only by its 16-digit PVID (you might see this
from the output of lsvg -p <VGname>), substitute the PVID for the disk name. For example:
# lspv -l 00c2b06ef8a9f98a
You may receive the following error:
0516-320 : Physical volume 00c2b06ef8a9f98a is not assigned to a volume group.
3. How to map the virtual scsi disk (on the client partiton) to the physical disk (on
the server partition)
In the following example, we are going to determine the mapping of virtual scsi disk, hdisk4
U9117.570.102B06E-V1-C7-T1-L810000000000
where V1 is the LPAR ID (in this case 1), C7 is the slot# (in this case 7), and L81 is the LUN ID.
Take note of these values.
Next, determine the client SCSI adapter name, by greping for the location of hdisk4's parent adapter, in this
case, V1-C7-T1:
# lscfg -v | grep V1-C7-T1
vscsi4
U9117.570.102B06E-V1-C7-T1
Device Specific.(YL)........U9117.570.102B06E-V1-C7-T1
hdisk4
U9117.570.102B06E-V1-C7-T1-L810000000000 Virtual SCSI Disk Drive
Take note of the remote_lpar_id (11) and the remote_slot_num (23). Then, in the same output, look for a
line that corresponds to "lpar_id 11, slot # 23
...
lpar_name=reg33_test_vios,lpar_id=11,slot_num=23,state=1,is_required=0,adapter
_type=server,
remote_lpar_id=any,remote_lpar_name=,remote_slot_num=any,backing_devices=none
...
So in this case, VIO server reg33_test_vios is serving virtual scsi disk, hdisk4, on the VIO client, kern1.
Example
$ lsmap -all|grep V11-C23
where V11 is the VIO server lpar_id and C23 is the slot #
The cmd will return something similar to
vhost21
U9117.570.102B06E-V11-C23
0x00000001
In this case, vhost21 is the server SCSI adapter mapped to our VIO client lpar id 1 (0x00000001).
Next, list the mapping for the vhost# obtained previously.
$ lsmap -vadapter vhost21
SVSA
--------------vhost21
Physloc
------------------------------U9117.570.102B06E-V11-C23
Client Partition ID
-----------------0x00000001
VTD
virdisk01
LUN
0x8100000000000000
Backing device
clientlv01
Physloc
Take note of the VTD and Backing device name. In this case, the backing device mapped to virtual scsi disk,
hdisk4, is logical volume, clientlv01, and it is associated with Virtual Target Device, virdisk01.
4. Remove the virtual scsi disk definition from the device configuration database on
the VIO client
To remove the vscsi definition, run
# rmdev -dl hdisk#
Ensure you know the backing device associated with the virtual scsi disk being removed prior to issuing the
rmdev command. That information will be needed in order to do clean up on the server partition. Refer to
the section "How to map the virtual scsi disk (on the client partition) to the physical disk (on the server
partitions)".
logical volume
physical volume
Prior to removing the backing device, the virtual target device must be removed first. To do so, run the
following as padmin:
$ rmdev -dev <VTD name>
$ rmlv <LVname>
or you can remove both the VTD and logical volume in one command by running:
$ rmvdev -vtd <VTD name> -rmlv
In the case where the backing device is a physical volume, then, removing the virtual target device
completes this document.
If you need to determine the physical device and volume group that the logical volume belongs to, you can
issue the following commands prior to running rmlv or rmvdev.
$ lslv -pv <LVname>
Lists the physical volume that the logical volume specified resides on.
$ lslv <Lvname>
Shows the characteristics of the logical volume, including the volume group name, # of mirrored copies,
and so on.
In our example, the backing device is a logical volume, clientlv01, and it resides on the physical device,
hdisk3:
$ lslv -pv clientlv01
clientlv01:N/A
PV
hdisk3
COPIES
080:000:000
IN BAND
100%
DISTRIBUTION
000:080:000:000:000
$ rmlv clientlv01
Warning, all data contained on logical volume clientlv01 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume clientlv01 is removed.
Related Documentation