I want to show you how to create a LVM snapshot on the fly, before you install some nasty updates.
I have my KVM virtual machine (/dev/vg0/Webserver) and want to upgrade it, before I go on, I want to create a LVM snapshot. In worst case it can change back to this state.
lvcreate -L 5000 -s -n "7.9_wheezy" /dev/vg0/devel.drobot.de
– L 5000 is the size in MB
-s flag is to create a snapshot
-n 7.9_wheezy is the name of new logical volume
If something goes wrong, go back to previously created snapshot:
1 2 3
lvchange -a n /dev/vg0/devel.drobot.de lvconvert --merge /dev/vg0/7.9_wheezy lvchange -a y /dev/vg0/devel.drobot.de
If you delete your origin volume your snapshot will be automatically deleted!