HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)

# 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 27).
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).
Handling Size Increases
From the LUN Side:
Disk arrays typically allow a LUN to be resized. If the volume group is activated during size
increase, this is known as Dynamic LUN Expansion (DLE). If you increase the size of a LUN, follow
these steps to incorporate the additional space into the volume group:
1. Increase the LUN size using the instructions for the array.
2. Verify that the LUN is expanded by running the diskinfo command.
From the LVM Side (for Version 1.0 Volume Groups):
Do the following for Version 1.0 volume groups.
1. Run vgmodify to detect any physical volume size changes. It also reports whether all of the
space can be made available to the volume group.
2. If vgmodify reports that the maximum number of physical extents per physical volume
(max_pe) is too small to accommodate the new size, use vgmodify with the -t and -n
options to determine a new value for max_pe, as described in “Modifying Volume Group
Parameters” (page 58).
3. Review the values by running vgmodify with the new settings and the -r option.
4. Deactivate the volume group, if needed.
TIP: Beginning with the September 2008 Update, you can use vgmodify to recognize and
accommodate size increases without deactivating the volume group. For more information,
see vgmodify(1M).
5. Commit any new value of max_pe and update the physical volume information by running
vgmodify without the -r option.
6. If needed, activate the volume group. To verify that the increased space is available, run the
vgdisplay and pvdisplay commands.
From the LVM Side (for Version 2.x Volume Groups):
Do the following for Version 2.x volume groups.
Moving and Reconfiguring Your Disks 77