Installation guide

Snapshot Volumes
15
Note
LVM snapshots are not supported for LVM mirrored logical volumes.
Because a snapshot copies only the data areas that change after the snapshot is created, the
snapshot feature requires a minimal amount of storage. For example, with a rarely updated origin, 3-5
% of the origin's capacity is sufficient to maintain the snapshot.
Note
Snapshot copies of a file system are virtual copies, not actual media backup for a file system.
Snapshots do not provide a substitute for a backup procedure.
The size of the snapshot governs the amount of space set aside for storing the changes to the origin
volume. For example, if you made a snapshot and then completely overwrote the origin the snapshot
would have to be at least as big as the origin volume to hold the changes. You need to dimension a
snapshot according to the expected level of change. So for example a short-lived snapshot of a read-
mostly volume, such as /usr, would need less space than a long-lived snapshot of a volume that
sees a greater number of writes, such as /home.
If a snapshot runs full, the snapshot becomes invalid, since it can no longer track changes on the
origin volume. You should regularly monitor the size of the snapshot. Snapshots are fully resizeable,
however, so if you have the storage capacity you can increase the size of the snapshot volume to
prevent it from getting dropped. Conversely, if you find that the snapshot volume is larger than you
need, you can reduce the size of the volume to free up space that is needed by other logical volumes.
When you create a snapshot file system, full read and write access to the origin stays possible. If
a chunk on a snapshot is changed, that chunk is marked and never gets copied from the original
volume.
There are several uses for the snapshot feature:
Most typically, a snapshot is taken when you need to perform a backup on a logical volume without
halting the live system that is continuously updating the data.
You can execute the fsck command on a snapshot file system to check the file system integrity and
determine whether the original file system requires file system repair.
Because the snapshot is read/write, you can test applications against production data by taking a
snapshot and running tests against the snapshot, leaving the real data untouched.
You can create LVM volumes for use with Red Hat virtualization. LVM snapshots can be used to
create snapshots of virtual guest images. These snapshots can provide a convenient way to modify
existing guests or create new guests with minimal additional storage. For information on creating
LVM-based storage pools with Red Hat Virtualization, see the Virtualization Administration Guide.
For information on creating snapshot volumes, see Section 4.4.4, “Creating Snapshot Volumes”.