Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6638
Synchronizing a Mirrored Logical Volume At times, the data in
your mirrored copy or copies of a logical volume can become out of sync,
or “stale”. For example, this might happen if LVM cannot access a disk as
a result of disk power failure. Under such circumstances, in order for
each mirrored copy to re-establish identical data, synchronization must
occur. Usually, synchronization occurs automatically, although there are
times when it must be done manually.
Automatic
Synchronization
If you activate a volume group that is not currently active, either
automatically at boot time or later with the vgchange command, LVM
automatically synchronizes the mirrored copies of all logical volumes,
replacing data in physical extents marked as stale with data from
nonstale extents. Otherwise, no automatic synchronization occurs and
manual synchronization is necessary.
LVM also automatically synchronizes mirrored data in the following
cases:
• When a disk comes back online after experiencing a power failure.
• When you extend a logical volume by increasing the number of
mirror copies, the newly added physical extents will be synchronized.
Manual
Synchronization
If you look at the status of a logical volume using lvdisplay -v, you can
see if the logical volume contains any stale data. You can then identify
which disk contains the stale physical extents. You manually
synchronize the data in one or more logical volumes using either the
lvsync command or all logical volumes in one or more volume groups
using the vgsync command. See lvdisplay (1M), vgsync (1M), and lvsync
(1M) for more information.
Replacing a Mirrored Disk In the event you need to replace a
nonfunctional mirrored disk, you should perform the following steps to
ensure that the data on the replacement disk are both synchronized and
valid:
Step 1. Before replacing the disk, minimize any potential loss of data due to its
removal; confirm that any mirrored logical volumes using the disk are
mirrored onto a separate disk and that those mirror copies are current.
You can find the list of logical volumes using the disk using pvdisplay:
pvdisplay -v /dev/dsk/c
n
t
n
d
n