Scheduling Policy; Synchronization Policy - HP -UX 11i Administrator's Manual

Logical volume management
Hide thumbs Also See for HP-UX 11i:
Table of Contents

Advertisement

on the same physical volume. The -s y and -s n options to the lvcreate or lvchange
commands set strict or nonstrict allocation.
CAUTION:
Using nonstrict allocation can reduce the redundancy created by LVM mirroring
because a logical extent can be mirrored to different physical extents on the same disk. Therefore,
the failure of this one disk makes both copies of the data unavailable.
Contiguous and Noncontiguous Allocation
Contiguous allocation has three characteristics: the physical extents are allocated in ascending
order, no gap exists between physical extents within a mirror copy, and all physical extents of a
mirror copy reside on a single physical volume. Noncontiguous allocation allows logical extents
to be mapped to nonconsecutive physical extents. The -C y and -C n options to the lvcreate
or lvchange commands set contiguous or noncontiguous allocation.
NOTE:
When the logical volumes allocated from the root volume group are mirrored, each must
be set up with contiguous allocation.

Scheduling Policy

The LVM scheduler converts logical I/O requests into one or more physical I/O requests, then
schedules them for processing at the hardware level. Scheduling occurs for both mirrored and
nonmirrored data.
Two I/O scheduling policies are available: parallel and sequential.
Parallel Scheduling
The parallel scheduling policy is used by default with mirroring for maximum I/O performance.
Parallel scheduling causes mirror operations to write simultaneously to all copies. LVM optimizes
reads by reading from the physical volume with the fewest outstanding I/O operations. The -d
p option to the lvcreate or lvchange command sets the scheduling policy to parallel for a
logical volume.
Sequential Scheduling
The sequential scheduling policy causes mirror write operations to proceed sequentially; that is,
LVM waits for one mirror write to complete before it begins the next mirror write. Likewise, LVM
mirrors are read in a predefined order. On a practical level, sequential policy is used only for
extreme caution in maintaining consistency of mirrors. The -d s option to the lvcreate or
lvchange command sets the scheduling policy to sequential for a logical volume.

Synchronization Policy

You can maintain consistency of mirrored data by enabling or disabling two features of your logical
volume: the Mirror Write Cache and Mirror Consistency Recovery.
Synchronization Using Mirror Write Cache
The Mirror Write Cache (MWC) provides a fast resynchronization of data following a system crash
or failure, but at a potential performance cost for routine system use.
The MWC keeps track of where I/O writes are occurring on the volume group, and periodically
records this activity in an ondisk data structure. An extra disk write is required for every mirrored
write not already recorded on the physical volume. This slows down runtime I/O write processing
and degrades performance when you access the disk at random; when writing to an area of the
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
Planning for Availability
25

Advertisement

Table of Contents
loading

Table of Contents