Creating Snapshot Volumes - 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

4.5. Creating Snapshot Volumes

Use the -s argument of the lvcreate command to create a snapshot volume. A snapshot volume is
writeable.
Note
LVM snapshots are not supported across the nodes in a cluster. You cannot create a
snapshot volume in a clustered volume group.
The following command creates a snapshot logical volume that is 100 megabytes in size named /
dev/vg00/snap. This creates a snapshot of the origin logical volume named /dev/vg00/lvol1.
If the original logical volume contains a file system, you can mount the snapshot logical volume on an
arbitrary directory in order to access the contents of the file system to run a backup while the original
file system continues to get updated.
lvcreate --size 100M --snapshot --name snap /dev/vg00/lvol1
After you create a snapshot logical volume, specifying the origin volume on the lvdisplay command
yields output that includes a a list of all snapshot logical volumes and their status (active or inactive).
The following example shows the status of the logical volume /dev/new_vg/lvol0, for which a
snapshot volume /dev/new_vg/newvgsnap has been created.
# lvdisplay /dev/new_vg/lvol0
--- Logical volume ---
LV Name
VG Name
LV UUID
LV Write Access
LV snapshot status
LV Status
# open
LV Size
Current LE
Segments
Allocation
Read ahead sectors
Block device
The lvs command, by default, displays the origin volume and the current percentage of the snapshot
volume being used for each snapshot volume. The following example shows the default output for
the lvs command for a system that includes the logical volume /dev/new_vg/lvol0, for which a
snapshot volume /dev/new_vg/newvgsnap has been created.
# lvs
/dev/new_vg/lvol0
new_vg
LBy1Tz-sr23-OjsI-LT03-nHLC-y8XW-EhCl78
read/write
source of
/dev/new_vg/newvgsnap1 [active]
available
0
52.00 MB
13
1
inherit
0
253:2
Creating Snapshot Volumes
41

Advertisement

Table of Contents
loading

Table of Contents