Saturday, August 7, 2010

migratepv VS replacepv

Replacepv simply moves all the logical partitions on one physical volume to another physical volume. The command is designed to make it easy to replace a disk in a mirrored configuration.

Migratepv is very similar. The biggest difference is that migratepv allows you to copy the LPs on a logical volume basis, not just on a physical volume basis. For instance, if you have a disk that has two logical volumes on it and you want to reorganize and put each logical volume on a different disk, migratepv can do it.

migratepv -l lv01 hdisk1 hdisk2
migratepv -l lv02 hdisk1 hdisk3

In this case, the logical partitions from logical volume lv01 are moved from hdisk1 to hdisk2. The logical partitions from logical volume lv02 are moved to hdisk3.

2 comments:

Anonymous said...

Thanks for clarification, may i know what is the difference between mirroring vg and mirroring LV

Regards,
Siva

Anonymous said...

If volume group is mirror lp's to pp's 1:2 ratio.

If lv mirror lp's to pp's 1:2 ratio
only for that LV.

mklvcopy lvname no.copies pvname

#mklvcopy lvname 1/2/3/ hdisk1