Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6 641
disk will be made on the substitute physical volume. This process is
referred to as automatic sparing, or just sparing. This occurs while
the file system remains available to users. You can then schedule the
replacement of the failed disk at a time of minimal inconvenience to you
and your users. At such time, you would then copy the data from the
spare disk back to the original disk or its replacement and return the
spare disk to its role as a “standby” empty disk.
Follow the steps below to configure one or more spare physical volumes
into each volume group for which you want protection against disk
failure. These steps must be performed prior to a disk failure actually
occurring.
NOTE MirrorDisk/UX is not available for shared LVM environments within a
high availability cluster. Since MirrorDisk/UX is required for sparing,
you will not be able to configure sparing using the steps below within
such shared LVM environments. In such cases, it is suggested that you
make use of hardware mirroring through RAID devices. Hardware
mirroring often supports its own form of sparing.
Step 1. Use the pvcreate command to initialize the disk as an LVM disk.
However, do not use the -B option since spare physical volumes cannot
contain boot information.
# pvcreate /dev/rdsk/c1t0d0
Step 2. Make sure the volume group has been activated.
vgchange -a y /dev/vg01
Step 3. Use the vgextend command with -z y to designate one or more physical
volumes as spare physical volumes within the volume group. 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.
vgextend -z y /dev/vg01 /dev/dsk/c1t0d0
In order for sparing to occur: