HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)
disk that is already recorded, the performance is not impaired. Upon system reboot after crash,
the operating system uses the MWC to resynchronize inconsistent data blocks quickly.
The frequency of extra disk writes is small for sequentially accessed logical volumes (such as
database logs), but increases when access is more random. Therefore, logical volumes containing
database data or file systems with few or infrequently written large files (greater than 256K) must
not use the MWC when runtime performance is more important than crash recovery time.
The -M option to the lvcreate or lvchange command controls the MWC.
Synchronization Using Mirror Consistency Recovery
When the Mirror Consistency Recovery is enabled, LVM does not impact runtime I/O performance.
However, following a system crash, for any logical volumes using Mirror Consistency Recovery,
the entire data space resynchronizes when you activate the volume group. Synchronization can
be performed in the background without interfering with reboot or access; however, during this
time I/O performance and redundancy are degraded.
Synchronization with No Mirror Consistency Mechanism
When Mirror Consistency Recovery is disabled, the operating system's runtime behavior is identical
to that of the previous approach. However, following a crash, LVM does not perform any
resynchronization of data. This approach is useful for swap volumes and for volumes used by an
application (such as a database) with its own means of maintaining or recovering consistent data,
such as transaction log files. However, database log files themselves can be configured as a
mirrored logical volume to use the MWC.
The -c option to the lvcreate or lvchange command controls the use of the Mirror Consistency
Recovery.
2.3.1.2 Synchronizing a Mirrored Logical Volume
The data in a mirrored copy or copies of a logical volume can become out of sync, or “stale.” For
example, mirrored data becomes stale if LVM cannot access a disk as a result of disk power failure.
Under such circumstances, for each mirrored copy to re-establish identical data, synchronization
must occur. Usually, synchronization occurs automatically, but sometimes 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, then LVM automatically synchronizes the mirrored copies of all
logical volumes with the Mirror Consistency Recovery policy enabled. It replaces 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 you increase the number of mirror copies of a logical volume using the –m option of
lvmerge, the newly added physical extents are synchronized.
• When a disk comes back online after experiencing a power failure.
Manual Synchronization
If you look at the status of a logical volume using lvdisplay -v, you can verify if the logical
volume contains any stale data. You can then identify which disk contains the stale physical extents.
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. For more
information, see lvdisplay(1M), vgsync(1M), and lvsync(1M).
2.3 Planning for Availability 29