I have a KVM host running a linux 2.2 guest. The virtual disk for the guest is an LVM logical volume. This is seen by the guest as a real disk, so it's partitioned, has a boot sector, etc.

Now my question is: if I take a snapshot of that logical volume while the guest is running, can I be sure that it is consistent? I've read that LVM should take care of freezing the filesystem contained on the logical volume prior to taking the snapshot, but how does it work in the case of a full disk image as I have here? Will the guest kernel somehow be involved in freezing the filesystems?

Thanks for any answers and sorry for the confusion.


It isn't consistent. Whether the dom0 LV contains a partition table, etc., or just a filesystem is irrelevant. The dom0 can only freeze those filesystems mounted in the dom0.

| improve this answer | |
  • Well it is crash consistent, but can loose recently written data not yet committed to journal. Any application that can recover from powerloss can recover from non-coordinated snapshots as well. This is especially true for transactional databases like Mysql InnoDB, as opposed to Mysql MyISAM which will burn data in that case. IIRC Mysql MyISAM will burn data even with frozen filesystem snaps, but not as badly. To backup Mysql MyISAM requires FLUSH TABLES WITH READ LOCK as well. So it all comes down to how well your application recovery is designed. – korkman Sep 4 '11 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy