migratepv command
Purpose
Moves allocated physical partitions from one physical volume to one or more other physical volumes.
Syntax
migratepv [ -lv LogicalVolume] SourcePhysicalVolume DestinationPhysicalVolume ...
Description
The migratepv command moves allocated physical partitions and the data they contain from the SourcePhysicalVolume to one or more other physical volumes, DestinationPhysicalVolume. All physical volumes must be within the same volume group. The specified source physical volume cannot be included in the list of DestinationPhysicalVolume parameters.
The allocation of the new physical partitions follows the policies defined for the logical volumes that contain the physical partitions being moved.
If you specify a logical volume that contains the boot image, the migratepv -lv command attempts to find enough contiguous partitions on one of the target physical volumes. If the migration is successful, the migratepv command will indicate a change in the boot device as well as the new boot physical volume. The attempted migration fails if the migratepv -lv command is unable to find enough contiguous space to satisfy the request.
Flags
Flag name | Description |
---|---|
-lv | Moves only the physical partitions allocated to the specified logical volume and located on the specified source physical volume. |
Exit Status
Return code | Description |
---|---|
8 | The physical volume is not assigned to a volume group |
Examples
- To move physical partitions from hdisk1 to hdisk6 and hdisk7,
type:
Physical partitions are moved from one physical volume to two others within the same volume group.migratepv hdisk1 hdisk6 hdisk7
- To move physical partitions in logical volume lv02 from hdisk1 to hdisk6,
type:
Only those physical partitions contained in lv02 are moved from one physical volume to another.migratepv -lv lv02 hdisk1 hdisk6