I heard recently about fsfreeze
and I'm very interested in making snapshots of my VM with VMware and get a consistent state of disk using quiescence.
All my file-systems are LVM volumes, and man fsfreeze
mentions:
fsfreeze is unnecessary for device-mapper devices. The device-mapper (and LVM) automatically freezes filesystem on the device when a snapshot creation is requested. For more details see the dmsetup(8) man page.
But I find fsfreeze
much more easy to use than a complex LVM tool where you need to evaluate your snapshot size.
Questions
- Is there a difference?
- Can I still use the command for a LVM volume? Or maybe a physical LVM volume?
- Or am I forced to use the
lvm
command?
Additional question for the bounty
Does the fsfreeze or lvm snapshot insure a consistent snapshot if used to backup a mysql/oracle/postgrSQL DB?
Some more information
The case here is simple but you need to understand all the concept.
VMWare is capable of taking vm snapshot pretty quickly (less than 5 seconds), and before and after that snapshot executing script to stabilize the vm state and get a consistent vm snaphot. I don't care being able to mount in read-only a lvm snapshot and I don't want to because they are limited to disk size and more-over . What I want is to fsfreeze
my filesystems and snapshot the vm and release the lock.
In that case could it be possible to use fsfreeze
instead of the lvm snapshot (which are more complex and disk space linked.