LVM Snapshot

by Mike on December 10, 2008

in Hardware

The LVM snapshot is a read-only logical volume that is a copy or clone of a logical volume at a specific point in time.  This type of program is used to capture a snapshot of a database for example by stopping the database just long enough to capture the snapshot, then restarting the database.  The backup program is able to read the snapshot, not the database.  It is interesting to note that the snapshot may be much smaller than the logical volume as the snapshot only needs to be as big as the data itself.  To create a snapshot use the lvcreate command.  There must be free extents to create the snapshot.

lvcreate -s -L100M -n snap /dev/vg0/bk

umount /dev/vg0/snap
lvremove /dev/vg0/snap

Previous post:

Next post: