Purpose
Replaces a
physical volume in a volume group with another physical volume.
Syntax
replacepv [ -f ] {SourcePhysicalVolume | SourcePhysicalVolumeID } DestinationPhysicalVolume
replacepv [ -R ] dir_name
[ DestinationPhysicalVolume ]
Description
The
replacepv command
replaces allocated physical partitions and the data they contain from
the
SourcePhysicalVolume to
DestinationPhysicalVolume.
The specified source physical volume cannot be the same as
DestinationPhysicalVolume.
Note: - The DestinationPhysicalVolume must not belong to a volume
group.
- The DestinationPhysicalVolume size must be at least the
size of the SourcePhysicalVolume.
- The replacepv command cannot replace a SourcePhysicalVolume with
stale logical volume unless this logical volume has a non-stale mirror.
- You cannot use the replacepv command on a snapshot volume
group or a volume group that has a snapshot volume group.
- Running this command on a physical volume that has an active firmware
assisted dump logical volume temporarily changes the dump device to /dev/sysdumpnull.
After the migration of logical volume is successful, this command
calls the sysdumpdev -P command to set the firmware assisted
dump logical volume to the original logical volume.
- The VG corresponding to the SourcePhysicalVolume is examined to
determine if a PV type restriction exists. If a restriction exists,
the DestinationPhysicalVolume is examined to ensure that it meets
the restriction. If it does not meet the PV type restriction, the
command will fail.
The allocation of the new physical partitions
follows the policies defined for the logical volumes that contain
the physical partitions being replaced.
Flags
Item |
Description |
-f |
Forces to replace a SourcePhysicalVolume with the specified DestinationPhysicalVolume unless
the DestinationPhysicalVolume is part of another volume group
in the Device Configuration Database or a volume group that is active. |
-R dir_name |
Recovers replacepv if it is interrupted by <ctrl-c>,
a system crash, or a loss of quorum. When using the -R flag,
you must specify the directory name given during the initial run of replacepv.
This flag also allows you to change the DestinationPhysicalVolume. |
Security
Access Control: You must have
root authority to run this command.
Examples
- To replace physical partitions
from hdisk1 to hdisk6, enter:
Files
Item |
Description |
/usr/sbin |
Directory where the replacepv command resides. |
/tmp |
Directory where the temporary files are stored while the command
is running. |