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).
Use the mklvcopy command to migrate data from one logical volume to another.
(-e m) ==> To use minimum inter-disk allocation policy
(-s y) ==> To strictly allocate mirror copies on separate physical volumes
(-k) ==> To synchronize new copies immediately
datalv ==> The name of the logical volume where you want to start a mirroring operation
2 ==> The number of copies that you want to make of the data (a maximum of 3)
hdisk3 and hdisk7 ==> The physical volumes where the logical volume resides
hdisk3 ==> The physical volume that already holds the data of logical volume datalv.
hdisk7 ==> The physical volume that will hold the mirror copy and where you want to move the data
The second example is like example 1. The mklvcopy command starts mirroring the infxlv logical volume.
Procedure
Identify the data that you want to migrate from one volume to another.Use the mklvcopy command to migrate data from one logical volume to another.
Results
When the command completes processing, a mirrored copy of the logical volume is created.Example
Mirroring is an LVM task that you perform only on logical volumes to migrate data. The following example shows how to create a mirror copy of a logical volume using the mklvcopy command:
# mklvcopy -e m -s y -k datalv 2 hdisk3 hdisk7
.
.
.
# splitlvcopy -y splitlv datalv 1
The mklvcopy command options specify the following values:.
.
.
# splitlvcopy -y splitlv datalv 1
(-e m) ==> To use minimum inter-disk allocation policy
(-s y) ==> To strictly allocate mirror copies on separate physical volumes
(-k) ==> To synchronize new copies immediately
datalv ==> The name of the logical volume where you want to start a mirroring operation
2 ==> The number of copies that you want to make of the data (a maximum of 3)
hdisk3 and hdisk7 ==> The physical volumes where the logical volume resides
hdisk3 ==> The physical volume that already holds the data of logical volume datalv.
hdisk7 ==> The physical volume that will hold the mirror copy and where you want to move the data
The second example is like 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, logical volume infxlv is initially located on physical
volume hdisk4 and the mirrored copy resides on physical volumehdisk10.
When the operation is complete, this is new location of the logical
volume..
.
.
# rmlvcopy infxlv 1 hdisk4
No comments:
Post a Comment