HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)
1. Use the pvcreate command to initialize the disk as an LVM disk.
NOTE: Do not use the -B option because spare physical volumes cannot contain boot
information.
# pvcreate /dev/rdisk/disk3
2. Ensure the volume group has been activated, as follows:
# vgchange -a y /dev/vg01
3. Use the vgextend command with -z y to designate one or more physical volumes as spare
physical volumes within the volume group. For example:
# vgextend -z y /dev/vg01 /dev/disk/disk3
Alternately, you can change a physical volume with no extents currently allocated within it
into a spare physical volume using the pvchange command with the -z y option. For
example:
# pvchange -z y /dev/disk/disk3
For more information on disk sparing, see “Increasing Disk Redundancy Through Disk Sparing”
(page 30).
3.4.6 Reinstating a Spare Disk
NOTE: Disk sparing requires the optional product HP MirrorDisk/UX.
Version 2.x volume groups do not support disk sparing.
After a failed disk has been repaired or a decision has been made to replace it, follow these steps
to reinstate it and return the spare disk to its former standby status:
1. Physically connect the new or repaired disk.
2. Restore the LVM configuration to the reconnected disk using vgcfgrestore as follows:
# vgcfgrestore -n /dev/vg01 /dev/rdisk/disk1
3. Ensure the volume group has been activated as follows:
# vgchange -a y /dev/vg01
4. Be sure that allocation of extents is now allowed on the replaced disk as follows:
# pvchange -x y /dev/disk/disk1
5. Use the pvmove command to move the data from the spare to the replaced physical volume.
For example:
# pvmove /dev/disk/disk3 /dev/disk/disk1
The data from the spare disk is now back on the original disk or its replacement, and the
spare disk is returned to its role as a standby empty disk.
For more information on disk sparing, see “Increasing Disk Redundancy Through Disk Sparing”
(page 30).
3.4.7 Modifying Physical Volume Characteristics
The vgmodify command enables you to modify a volume group to adapt to changes in physical
volumes. In particular, you can adjust the volume group to recognize size changes in physical
volumes, and (for Version 1.0 volume groups only) you can change a physical volume type between
bootable and nonbootable.
Beginning with the March 2009 Update, the vgmodify command can be run online (volume
group activated and applications running) for Version 1.0 and Version 2.x volume groups. This
allows physical volume sizes to be adjusted online. This is known as Dynamic LUN Expansion
(DLE) and Dynamic LUN Contraction (DLC).
80 Administering LVM