The second example is similar to example 1. The mklvcopy command starts
mirroring the infxlv logical volume.
# mklvcopy -e m -s y -k infxlv 2 hdisk4 hdisk10
.
.
.
# rmlvcopy infxlv 1 hdisk4
In this example, hdisk4 is where the data for infxlv already exists, and hdisk10 is
where the mirror copy resides. It is also where you want to ultimately move the
data.
Using the migratepv command
Use the following information as a guide for how to use the logical volume manager
(LVM) migratepv command to migrate data that is associated with physical
volumes.
You can use the LVM migratepv command to migrate data that is associated with
physical volumes.
The following examples show how to use the migratepv command.
# migratepv hdisk1 hdisk2
# migratepv -l datalv hdisk3 hdisk9
In the example, all data migrates from hdisk1 to hdisk2. The migratepv command
updates all LVM references. From the time that the command completes, the LVM
no longer uses hdisk1 to access data that was previously stored there. As the data
is physically moved, the target physical volume must have enough spare physical
volumes to accommodate data from the source physical volumes. After this
command completes, you can remove the source-physical volume from the volume
group.
To avoid disrupting users, use the migratepv command while the system is active.
The migratepv command migrates data by performing the following actions:
v Creating a mirror of the logical volumes that you are moving
v Synchronizing the logical volumes
v Removing the original logical volume
You
can use the migratepv command to move data from one physical volume to
another physical volume within the same volume group. The following usage
parameters apply to this command:
migratepv [-i] [-l LVname] SourcePV DestinationPV...
Note: You can specify more than one destination physical volume.
First, identify the source disk from which you want to migrate the data. Then,
identify the target disk to which you want to migrate the data. You can only migrate
to disks that are already in the rootvg volume group. To get a list of disks that are
Chapter 9. Migrating data to a storage unit 131