Linux – How to keep or drop LVM snapshot

linuxlvmsnapshot

I have made an LVM snapshop by

lvcreate --name snap --size 10G -s /dev/vg00/vm

What command should I write if I want to drop the snapshot, and not keep the changes that have happened since the snapshot?

And what command should I write to roll the changes from the snapshot into /dev/vg00/vm ?

Best Answer

to drop snapshot use:

lvremove group/snap-name

to merge snapshot use:

lvconvert --merge group/snap-name

Though merging will be deferred until the orgin and snapshot volumes are unmounted. You may need to update kernel (>=2.6.33) and lvm tools to have support for merging.