This procedure describes how to move the physical partitions belonging to one or more specified logical volumes from one physical volume to one or more other physical volumes in a volume group.
You might want to use this procedure to move the data from a failing disk before it is removed for repair or replacement. This procedure can be used on physical volumes in the rootvg volume group or on physical volumes in a user-defined volume group.
Attention: When the boot logical volume is migrated from a physical volume, the boot record on the source should be cleared. Failure to clear this record may result in a system hang. When you execute the bosboot command, you must also execute mkboot -c (see step 4 of the following procedure.)
Be sure you read and understand the following articles:
lsvg -p VGnameThe output will look similar to the following:
rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 159 0 00..00..00..00..00
lsdev -Cc diskThe output should resemble the following:
hdisk0 Available 00-08-00-30 670 MB SCSI Disk Drive hdisk1 Available 00-08-00-20 857 MB SCSI Disk Drive
lspvIn the following example, hdisk1 can be used as a destination disk:
hdisk0 0000078752249812 rootvg hdisk1 000000234ac56e9e none
extendvg VGName hdiskNumber
lspv SourceDiskNumber | grep "USED PPs"The output will look similar to the following:
USED PPs: 159 (636 megabytes)In this example, you would need 159 FREE PPs on the destination disk to successfully complete the migration.
lspv DestinationDiskNumber | grep "FREE PPs"Add the FREE PPs from all of the destination disks. If the sum is larger than the number of USED PPs from step 3, you will have enough space for the migration.
Check to see if the boot logical volume (hd5) is on the source disk:
lspv -l SourceDiskNumber | grep hd5If you get no output, the boot logical volume is not located on the source disk. Continue to step 5.
If you get output similar to the following:
hd5 2 2 02..00..00..00..00 /blvthen run the following command:
migratepv -l hd5 SourceDiskNumber DestinationDiskNumberNext, you will get a message warning you to perform the bosboot command on the destination disk. You must also perform a mkboot -c command to clear the boot record on the source. Do the following:
bosboot -a -d /dev/DestinationDiskNumberthen:
bootlist -m normal DestinationDiskNumberthen:
mkboot -c -d /dev/SourceDiskNumber
smit migratepv
reducevg VGNname SourceDiskNumber
rmdev -l SourceDiskNumber -d