Skip to main content

SUSE Lesson 21 LVM Snapshots

By October 2, 2013No Comments

In the previous lesson 20, we took a look at Linux and LVM, logical volume management. This week we take it a step further with using LVM snapshots. LVM snapshots allow for consistency in backups; we create a snapshot volume and backup the snapshot volume not the target. In doing this we are backing up the target volume at the time the snapshot was taken.

The snapshot volume only needs to hold changes that take place during the backup; as such then it may be quite small. We create snapshots volumes using the -s option of lvcreate.

lvcreate -L150M -s -n backup /dev/vg1/data

Here we create a small snapshot volume called backup which is a targeting the data volume.