The Snapshot And Snapshot-Origin Mapping Targets - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

Appendix A. The Device Mapper
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
A.1.4. The snapshot and snapshot-origin Mapping Targets
When you create the first LVM snapshot of a volume, four Device Mapper devices are used:
1. A device with a linear mapping containing the original mapping table of the source volume.
2. A device with a linear mapping used as the copy-on-write (COW) device for the source volume;
for each write, the original data is saved in the COW device of each snapshot to keep its visible
content unchanged (until the COW device fills up).
3. A device with a snapshot mapping combining #1 and #2, which is the visible snapshot volume
4. The "original" volume (which uses the device number used by the original source volume), whose
table is replaced by a "snapshot-origin" mapping from device #1.
A fixed naming scheme is used to create these devices, For example, you might use the following
commands to create an LVM volume named base and a snapshot volume named snap based on that
volume.
# lvcreate -L 1G -n base volumeGroup
# lvcreate -L 100M --snapshot -n snap volumeGroup/base
This yields four devices, which you can view with the following commands:
# dmsetup table|grep volumeGroup
volumeGroup-base-real: 0 2097152 linear 8:19 384
volumeGroup-snap-cow: 0 204800 linear 8:19 2097536
volumeGroup-snap: 0 2097152 snapshot 254:11 254:12 P 16
volumeGroup-base: 0 2097152 snapshot-origin 254:11
# ls -lL /dev/mapper/volumeGroup-*
brw-------
1 root root 254, 11 29 ago 18:15 /dev/mapper/volumeGroup-base-
real
84

Advertisement

Table of Contents
loading

Table of Contents