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.

Note: All logical volume manager migration functions work by creating a mirror of the logical volumes involved, then resynchronizing the logical volumes. The original logical volume is then removed. If the migratepv command is used to move a logical volume containing the primary dump device, the system will not have an accessible primary dump device during the execution of the command. Therefore, a dump taken during this execution may fail.

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

  1. To move physical partitions from hdisk1 to hdisk6 and hdisk7, type:
    migratepv hdisk1 hdisk6 hdisk7
    Physical partitions are moved from one physical volume to two others within the same volume group.
  2. To move physical partitions in logical volume lv02 from hdisk1 to hdisk6, type:
    migratepv -lv lv02 hdisk1 hdisk6
    Only those physical partitions contained in lv02 are moved from one physical volume to another.



Last updated: Wed, November 18, 2020