Using mirroring to migrate data

You can use the logical volume manager (LVM) mirroring function to migrate data from one logical volume to another. The LVM mirroring function cannot migrate data between physical volumes.


  1. Identify the data that you want to migrate from one volume to another.
  2. Use the mklvcopy command to migrate data from one logical volume to another.


The mklvcopy command options specify the following values:
(-e m)
To use minimum inter-disk allocation policy.
(-s y)
To strictly allocate mirror copies on separate physical volumes.
To synchronize new copies immediately.
The name of the logical volume where you want to start a mirroring operation.
The number of copies that you want to make of the data (a maximum of 3).
hdisk3, hdisk7
The physical volumes where the logical volume is located.
The physical volume that already holds the data of logical volume datalv.
The physical volume that you want to hold the mirror copy and where you want to move the data.

Invoking the command to create a mirror copy and migrate data

Mirroring is an LVM task for data migration on logical volumes only. The example shows that a mirror copy of a logical volume is created through the mklvcopy command. Then, mirroring is started the infxlv logical volume. The logical volume infxlv is initially on physical volume hdisk4 and the mirrored copy is on physical volume hdisk10. When the operation is completed, the logical volume has migrated to the new location.
# mklvcopy -e m -s y -k datalv 2 hdisk3 hdisk7
# splitlvcopy -y splitlv datalv 1

# mklvcopy -e m -s y -k infxlv 2 hdisk4 hdisk10
# rmlvcopy infxlv 1 hdisk4