Monday, August 29, 2011

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