chpv Command
Purpose
Changes the characteristics of a physical volume in a volume group.
Syntax
chpv [ -h hotspare ] [ -a allocation ] [ -v availability [-f]][ -c ] [ -p mirrorpool ] [ -P ] [ -m mirrorpool ] physicalvolume ... [ -C hdiskname ]
Description
The chpv command
changes the state of the physical volume in a volume group by setting
allocation permission to either allow or not allow allocation and
by setting the availability to either available or removed. This command
can also be used to clear the boot record for the given physical volume.
Characteristics for a physical volume remain in effect unless explicitly
changed with the corresponding flag.
Note: To use this command, you
must either have root user authority or be a member of the system group.
You can also use the System Management Interface Tool (SMIT) smit chpv fast path to run this command.
Flags
Item | Description |
---|---|
-a allocation | Sets the allocation permission for additional physical partitions
on the physical volume specified by the physicalvolume parameter. Either
allows (yes) the allocation of additional physical partitions on the
physical volume, or prohibits (no) the allocation of additional physical
partitions on the physical volume. The allocation variable
can be either:
|
-c | Clears the boot record of the given physical volume. |
-C hdiskname | Clears the owning volume manager from a disk. This flag is only valid when running as the root user. This command will fail to clear LVM as the owning volume manager if the disk is part of an imported LVM volume group. |
-f | Forces a physical volume with open logical volumes to be unavailable (removed), unless the physical volume has active paging or a dump device. |
-h hotspare | Sets the sparing characteristics of the physical volume so
that the physical volume can be used as a hot spare. Also sets the
allocation permission for physical partitions on the physical volume
specified by the physicalvolume parameter. This flag has no
meaning for non-mirrored logical volumes. The hotspare variable
can be either:
|
-m mirrorpool | Changes the name of the mirror pool that is assigned to the specified disk to the value of the mirrorpool parameter. |
-p mirrorpool | Assigns the physical volume to a mirror pool. The name of a mirror pool can be up to 15 characters in length. After mirror pools are enabled in a volume group, the volume group can no longer be imported into a version of AIX® (before AIX Version 6.1) that does not support mirror pools. |
-P | Removes the physical volume from the mirror pool that is being assigned. The physical volume can only be removed from the mirror pool if it has partitions that are allocated to a logical volume where mirror pools are enabled. |
-v availability | Sets the availability of the physical volume. If you set the availability to closed, logical
input and output to the physical volume are stopped. Access to physical volume data by the file
system or the virtual memory manager is stopped, but you can continue to use the system management
commands. The availability variable can be either:
|
Examples
- To close physical volume hdisk3, enter:
chpv -v r hdisk3The physical volume is closed to logical input and output until the -v a flag is used.
- To open physical volume hdisk3, enter:
chpv -v a hdisk3The physical volume is now open for logical input and output.
- To stop the allocation of physical partitions to
physical volume hdisk3, enter: chpv -a n hdisk3No physical partitions can be allocated until the -a y flag is used.
- To clear the boot record of a physical volume hdisk3,
enter:
chpv -c hdisk3
Files
Item | Description |
---|---|
/usr/sbin | Directory where the chpv command resides. |
/tmp | Directory where temporary files are stored while the command is running. |