Scenario:
On the VIO_Client:
1) # unmirrovg rootvg hdisk1 : Unmirror the failing disk.
2) # bosboot -ad /dev/hdisk0 : Create a bootimage on hdisk0.
3) # boolist -m both -o hdisk0 : Change the boot order.
4) # reducevg -d -f rootvg hdisk1 : Remove the failing disk from the rootvg
5) # rmdev -dl hdisk1 : Command to remove the disk from the machine.
Now the disk can be removed from the VIO_Server:
The "hdisk1" is presented at the VIO_Client as the logical volume of name "vioc_1_rootvg" that belongs to the volume group called "vioc_rootvg_1" that is made up of physical volume hdisk2 at the VIOS end.
Since the hdisk1 is the failed disk which has to be replace, which in turn refer to a logical volume at the VIOS. We need to remove the logical volume.
Note: The logical volume is associated with the Virtual Targer Device "vtscsi0" and mapped to the virtual client SCSI Adapter "vscsi1".
1) Login into VIOS_Sever as padmin.
2) $ lslv vioc_1_rootvg : Make a note of the size of the LV (No.of LP/PP Counts).
3) $ rmdev -vtd vtscsi0 : Command to remove the Virtual Target Device.
4) $ rmlv -f vioc_1_rootvg : Command to remove the logical volume.
5) $ lsvg -lv vioc_rootvg_1 : Command to verify the logical volume has been remove from the volume group.
6) $ mklv -lv vioc_1_rootvg vioc_rootvg_1 32G: Command to recreate another logicalvolume of same size.
7) $ lslv vioc_1_rootvg : Command to verify the logical volume has been created.
8) $ mkvdev -dev vioc_1_rootvg -vadapter vhost0 : Mapping of the logical volume to the Virtual SCSI client adapter.
9) $ lsmap -vadapter vhost0 : Verify the mapping has been done successfully.
On the client:
1) # cfgmgr : Command to look for any new devices added.
2) # lspv : List the physical volumes. Look for the one in "None" state.
3) # extendvg rootvg hdisk# : Command to add the new disk to the rootvg.
4) # mirrorvg rootvg hdisk# : Command to mirror the rootvg to the newly added disk.
5) # lsvg -m rootvg : Command to verify the rootvg is mirrored onto new disk.
6) # bosboot -ad /dev/hdisk# : Create a boot image on the newly added disk.
7) # bootlist -m both -o hdisk# : Update the bootlist.
> The volume group on the virtual I/O client is rootvg.> The virtual SCSI adapter on the virtual I/O client is vscsi1.> The failing disk on the virtual I/O client is hdisk1.> The virtual disk is LVM mirrored on the virtual I/O client.> The size is 32 GB.
In the LVM scenario, we want to replace hdisk2 in the volume group vioc_rootvg_1, which contains the LVs vioc_1_rootvg associated to vtscsi0. It has the following attributes:
> The virtual SCSI adapter on the virtual I/O server is vhost0.
On the VIO_Client:
1) # unmirrovg rootvg hdisk1 : Unmirror the failing disk.
2) # bosboot -ad /dev/hdisk0 : Create a bootimage on hdisk0.
3) # boolist -m both -o hdisk0 : Change the boot order.
4) # reducevg -d -f rootvg hdisk1 : Remove the failing disk from the rootvg
5) # rmdev -dl hdisk1 : Command to remove the disk from the machine.
Now the disk can be removed from the VIO_Server:
The "hdisk1" is presented at the VIO_Client as the logical volume of name "vioc_1_rootvg" that belongs to the volume group called "vioc_rootvg_1" that is made up of physical volume hdisk2 at the VIOS end.
Since the hdisk1 is the failed disk which has to be replace, which in turn refer to a logical volume at the VIOS. We need to remove the logical volume.
Note: The logical volume is associated with the Virtual Targer Device "vtscsi0" and mapped to the virtual client SCSI Adapter "vscsi1".
1) Login into VIOS_Sever as padmin.
2) $ lslv vioc_1_rootvg : Make a note of the size of the LV (No.of LP/PP Counts).
3) $ rmdev -vtd vtscsi0 : Command to remove the Virtual Target Device.
4) $ rmlv -f vioc_1_rootvg : Command to remove the logical volume.
5) $ lsvg -lv vioc_rootvg_1 : Command to verify the logical volume has been remove from the volume group.
6) $ mklv -lv vioc_1_rootvg vioc_rootvg_1 32G: Command to recreate another logicalvolume of same size.
7) $ lslv vioc_1_rootvg : Command to verify the logical volume has been created.
8) $ mkvdev -dev vioc_1_rootvg -vadapter vhost0 : Mapping of the logical volume to the Virtual SCSI client adapter.
9) $ lsmap -vadapter vhost0 : Verify the mapping has been done successfully.
On the client:
1) # cfgmgr : Command to look for any new devices added.
2) # lspv : List the physical volumes. Look for the one in "None" state.
3) # extendvg rootvg hdisk# : Command to add the new disk to the rootvg.
4) # mirrorvg rootvg hdisk# : Command to mirror the rootvg to the newly added disk.
5) # lsvg -m rootvg : Command to verify the rootvg is mirrored onto new disk.
6) # bosboot -ad /dev/hdisk# : Create a boot image on the newly added disk.
7) # bootlist -m both -o hdisk# : Update the bootlist.
> The volume group on the virtual I/O client is rootvg.