HP-UX 11i v3 LVM Volume Group Migration

...
source_pv_n destination_pv_n_1 destination_pv_n_2 ....
You can generate the diskmap file manually or automatically as follows:
o Manually
To move data in volume group /dev/vg01 from /dev/disk/disk100 to
/dev/disk/disk101, enter:
#echo “/dev/disk/disk100 /dev/disk/disk101” > diskmap.txt
o Automatically
To move data in a volume group /dev/vg01 from /dev/disk/disk100 to
/dev/disk/disk101, add the new disks to a file as follows:
#echo “/dev/disk/disk101” > newdisk.txt
Then, generate the diskmap file as follows:
#vgmove –i newdisk.txt –f diskmap.txt /dev/vg01
The preceding examples show only one disk. You can generate a diskmap file with multiple disks.
3. Preview the migration operation to check whether the migration can finish successfully.
#vgmove –p –f diskmap.txt /dev/vg01
4. Make sure that all the prerequisites are met. The vgmove command reports failures if any of the
prerequisites are not met.
5. Make sure that all the destination physical volumes have enough space to accommodate the
source logical volumes. Note that vgmove command internally checks and fails if there is not
enough space.
6. After the command completes in preview mode, execute the actual command as follows:
#vgmove –f diskmap.txt /dev/vg01
Volume group migration flow
The following steps describe the flow of the volume group migration. The flow helps you to take
necessary action in case of any unexpected failures.
1. The vgmove command checks for the availability of the source and destination disks. When it is
successful, vgmove command invokes pvcreate internally. Then, it adds (using vgextend) the
destination disk to the volume group, if its not already a part of the volume group.
2. After extending the volume, vgmove transfers all the logical volumes from the source disks to the
destination disks using the pvmove command. While transferring the logical volumes, the vgmove
command honors the allocation and mirroring policies of the extents being moved.
3. When vgmove is invoked with the preview option, the following line appears if it is successful. The
diskmap.txt file has /dev/disk/disk107 and /dev/disk/disk112:
# vgmove -p -f /tmp/diskmap.txt /dev/vg01
The vgmove command can be successfully run.
4. When the actual command is run following is output:
# vgmove -f /tmp/diskmap.txt /dev/vg01
Physical volume "/dev/rdisk/disk112" has been successfully created.
Volume group "/dev/vg01" has been successfully extended.
Transferring logical extents of logical volume "/dev/vg01/lvol1"...
Transferring logical extents of logical volume "/dev/vg01/lvol2"...
Transferring logical extents of logical volume "/dev/vg01/lvol3"...
Transferring logical extents of logical volume "/dev/vg01/lvol4"...
Physical volume "/dev/disk/disk107" has been successfully moved.
Volume group "/dev/vg01" has been successfully reduced.
The vgmove command completed successfully.
3