pvchange.1m (2012 03)

p
pvchange(1M) pvchange(1M)
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
administrator to ensure that the data on the disk is sufficiently mirrored to satisfy availability require-
ments prior to making the device unavailable by detaching it.
Although detaching a path or physical volume ensures it is unavailable to LVM, attaching a path or phy-
sical volume will not necessarily make the path or physical volume available again. Attaching a path or
physical volume 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 physical volume or path only temporarily changes the status of the indicated path or physical
volume. However, 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 command (see vgchange (1M)). If the objective is to permanently add or remove a path or
physical volume from the volume group, the vgextend
or vgreduce commands (see vgextend (1M), and
vgreduce (1M)) should instead be used.
Warning: Detaching any physical volume or path using the
-a N or -a n options also disables
automatically attaching any paths to any of the physical volumes in the volume group. LVM will no
longer attempt to automatically recover any unattached physical 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
-a y options of vgchange command.
Attaching or Detaching Physical Volumes in Shared Volume Groups
The scope of the
pvchange command is limited to the specific node on which it runs. 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 physical volume must be detached and attached independently on
each of the systems in the cluster.
Alternate Links (PVLINKS)
In this release of HP-UX, LVM continues to support Alternate Links to a device to allow continued access
to the device, if the primary link fails. This multiple link or multipath solution increases data availabil-
ity, but does not allow the multiple paths to be used simultaneously.
There is a new feature introduced in the Mass Storage Subsystem on this version of HP-UX that also sup-
ports multiple paths to a device and allows access to the multiple paths simultaneously. The Mass
Storage Subsystem will balance the I/O load across the valid paths. This new multi-path behavior is
enabled and disabled through the use of the scsimgr command. See scsimgr (1M) for details.
It is no longer required or recommended to configure LVM with alternate links. However, it is possible to
maintain the traditional LVM behavior. To do so, both of the following criteria must be met:
Only the legacy device special file naming convention is used in the volume group configuration.
The scsimgr command is used to disable the Mass Storage Subsystem multipath behavior.
Half Dead Disk Detection
An I/O to the bad blocks of the disk returns media error (EMEDIA: error code 0x7c). A physical disk that
returns media error for write I/Os while allowing read I/Os to succeed is termed Half Dead Disk. The
term also refers to a disk that returns media error for certain regions while the rest is unaffected. When a
disk is fully dead (i.e. both read and write I/Os to any region of the disk fails), LVM detects it automati-
cally and marks it as unavailable. Half dead disk detection is not turned on by default in LVM and can
be enabled by using either or both of the
-C and -T settings.
Half dead disk detection helps prevent LVM from attempting indefinite recovery of affected physical
volumes (and any IO overheads resulting from it) by detecting the condition and removing such PVs
automatically from LVM usage (in other words, marking them as unavailable) until next activation. The
exclusion of a PV from LVM usage happens after certain number of media errors or duration of media
errors, controlled by the
-C and -T thresholds, respectively.
The
-C and -T parameters can be set independent of each other. When both are set, the PV will
be marked unavailable upon reaching either of the thresholds.
Most external storage array disks will have the ability to remap bad blocks transparently and
may not require this feature. Enable this feature only for disks like internal disks that can return
media errors.
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: March 2012