A.1.3. The mirror Mapping Target

A.1.3. The mirror Mapping Target

The mirror mapping target supports the mapping of a mirrored logical device. The format of a mirrored target is as follows:

start length mirror log_type #logargs logarg1 ... logargN #devs device1 offset1 ... deviceN offsetN
start

starting block in virtual device

length

length of this segment

log_type

The possible log types and their arguments are as follows:

core

The mirror is local and the mirror log is kept in core memory. This log type takes 1 - 3 arguments:

regionsize [[no]sync] [block_on_error]

disk

The mirror is local and the mirror log is kept on disk. This log type takes 2 - 4 arguments:

logdevice regionsize [[no]sync] [block_on_error]

clustered_core

The mirror is clustered and the mirror log is kept in core memory. This log type takes 2 - 4 arguments:

regionsize UUID [[no]sync] [block_on_error]

clustered_disk

The mirror is clustered and the mirror log is kept on disk. This log type takes 3 - 5 arguments:

logdevice regionsize UUID [[no]sync] [block_on_error]

LVM maintains a small log which it uses to keep track of which regions are in sync with the mirror or mirrors. The regionsize argument specifies the size of these regions.

In a clustered environment, the UUID argument is a unique identifier associated with the mirror log device so that the log state can be maintained throughout the cluster.

The optional [no]sync argument can be used to specify the mirror as "in-sync" or "out-of-sync". The block_on_error argument is used to tell the mirror to respond to errors rather than ignoring them.

#log_args

number of log arguments that will be specified in the mapping

logargs

the log arguments for the mirror; the number of log arguments provided is specified by the #log-args parameter and the valid log arguments are determined by the log_type parameter.

#devs

the number of legs in the mirror; a device and an offset is specifed for each leg.

device

block device for each mirror leg, referenced by the device name in the filesystem or by the major and minor numbers in the format major:minor. A block device and offset is specified for each mirror leg, as indicated by the #devs parameter.

offset

starting offset of the mapping on the device. A block device and offset is specified for each mirror leg, as indicated by the #devs parameter.

The following example shows a mirror mapping target for a clustered mirror with a mirror log kept on disk.

0 52428800 mirror clustered_disk 4 253:2 1024 UUID block_on_error 3 253:3 0 253:4 0 253:5 0
0

starting block in virtual device

52428800

length of this segment

mirror clustered_disk

mirror target with a log type specifying that mirror is clustered and the mirror log is maintained on disk

4

4 mirror log arguments will follow

253:2

major:minor numbers of log device

1024

region size the mirror log uses to keep track of what is in sync

UUID

UUID of mirror log device to maintain log information throughout a cluster

block_on_error

mirror should respond to errors

3

number of legs in mirror

253:3 0 253:4 0 253:5 0

major:minor numbers and offset for devices constituting each leg of mirror


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.