1.
Instead of manually creating a diskmap file, mapping the old source to new destination disks,
the
-i
option is used to generate a diskmap file for the migration. The user provides a list of
destination disks, called
newdiskfile
in this example.
# cat newdiskfile
/dev/disk/disk10
/dev/disk/disk11
# vgmove -i newdiskfile -f diskmap.txt /dev/vg00
2.
The resulting
diskmap.txt
file contains the mapping of old source disks to new destination
disks:
# cat diskmap.txt
/dev/disk/disk1 /dev/disk/disk10 /dev/disk/disk11
3.
Then another vgmove command is issued to actually perform the data migration:
# vgmove -f diskmap.txt /dev/vg00
Upon successful completion of data migration by
vgmove
, the original source disk will be
automatically removed from the volume group using
vgreduce
. If a destination disk is not already
part of the volume group, it will be added using
vgextend
.
After successful migration, the destination disks are added to the LVM configuration files; namely,
/etc/lvmtab
or
/etc/lvmtab_p
. The source disks along with their alternate links are removed
from the LVM configuration files.
The volume group must be activated before running the
vgmove
command. If the
vgmove
command
is interrupted before it completes, the volume group is in the same state it was at the beginning of
the
vgmove
command. The migration can be continued by running the
vgmove
command with
the same options and disk mapping file.
NOTE:
For volume groups that support bootable physical volumes (Version 1.0 and Version 2.2
or higher),
vgmove
supports moving boot PVs. If the diskmap file contains a mix of bootable and
non-bootable source PVs, the bootable source PV must be specified first.
Migrating a Logical Volume to New Disks:
lvmove
Beginning with the HP-UX 11i v3 March 2010 Update, LVM provides a new
lvmove
command
to migrate a logical volume within a volume group. The intent is to balance a logical volume either
within the existing set of physical volumes or within a new set of physical volumes in the volume
group.
The volume group must be activated before running the
lvmove
command. If the
lvmove
command
is interrupted before it completes, the volume group is left in a consistent state, and can still be
activated. The migration can be continued by running the
lvmove
command with the same options
and mapping file. See the lvmove(1M) manpage for more information about the
lvmove
command
and its options.
96
Administering LVM