HP-UX Reference (11i v1 05/09) - 1M System Administration Commands N-Z (vol 4)

p
pvchange(1M) pvchange(1M)
volume back into a regular physical volume for this volume group. No physical
extents from a spare physical volume will be available as part of the "free" pool of
extents in the volume group. A spare physical volume will only be used in the
event that another physical volume within this volume group becomes unavail-
able (fails). sparepv can have one of the following values:
y Change the specified physical volume to be a "stand-by" spare for its
volume group. The specified physical volume must not have extents
allocated on it (i.e., no logical volumes residing on it) at the time this
command is issued. A stand-by spare physical volume will only be
used in the event of a failure of another physical volume -- prior to
such a failure, no logical volume is allowed to reside on it.
n Change the specified spare physical volume back into a regular physi-
cal volume. If the physical volume was a stand-by spare, then all of
the disk space associated with it will be immediately available for use
by logical volumes. If the physical volume is an "active" spare, that is,
it was previously a stand-by spare but then took over for a failed phy-
sical volume, it will simply mark the physical volume as a regular
member of its volume group and the logical volumes residing on it will
remain unchanged.
Special Notes Regarding Attaching and Detaching Physical Volumes
Detaching a physical volume makes the data on that disk unavailable. LVM will not write or read any user
data or LVM metadata to the disk while it is detached. Consequently, it is important for the adminstrator
to assure that the data on the disk is sufficiently mirrored to satisfy availability requirements prior to mak-
ing the device unavailable by detaching it.
Although detaching a path or PV definitely makes it unavailable to LVM, attaching a path or PV will not
necessarily make the path or PV available again. Attaching a path or PV only makes it available for LVM
to use once the disk is working. For instance, if a disk is spinning up, LVM will successfully attach the
disk, but the disk will not be available until it is ready.
Detaching a PV or path only temporarily changes the status of the indicated path or physical volume. How-
ever, it does not change the volume group configuration. When a physical volume is detached, it will
automatically be attached again the next time the volume group is activated using the vgchange(1M) com-
mand. If the objective is to permanently add or remove a path or PV from the volume group, the
vgextend(1M) or vgreduce(1M) commands should be used instead.
Detaching any PV or path using the -a N or n options also disables automatically attaching any physical
volumes for the volume group. LVM will no longer attempt to automatically recover any unattached physi-
cal volumes in the volume group, not just the ones explicitly detached. To cause LVM to once again
automatically attach devices in the volume group use the vgchange(1M) -a y command.
Special Notes for Attaching or Detaching Physical Volumes in Shared Volume Groups
The scope of the pvchange(1M) command is limited to the specific node it is run on. Systems that are part
of a Serviceguard cluster operate independently. To replace disks that are part of a volume group shared
by a Serviceguard cluster, the PV must be detached and attached independently on each of the systems in
the cluster.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is null, it defaults to C (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to
C (see environ(5)).
EXAMPLES
Prohibit the allocation of additional physical extents to a physical volume:
pvchange -x n /dev/dsk/c0t0d0
Allow the allocation of additional physical extents to a physical volume:
Section 1M694 Hewlett-Packard Company 3 HP-UX 11i Version 1: September 2005