> My guess is it would run 'sync' once or twice before beginning a
> snapshot, or maybe some more sophisticated equivalent. I think we'd know
> by now if it didn't.

I think we'd know if it did because `sync` can take an awfully long time
and the whole system should stall all new writes during that time: it
would be quite disruptive.

Instead when I read

    This facility does require that the snapshot be made at a time when
    the data on the logical volume is in a consistent state - the
    VFS-lock patch for LVM1 makes sure that some filesystems do this
    automatically when a snapshot is created, and many of the
    filesystems in the 2.6 kernel do this automatically when a snapshot
    is created without patching.

I understand it to mean "just as consistent as a real drive would be at the
time of a power loss".  So there's no need to empty the journal or stall
new writes: just make sure the journal entries "up to now" have reached
the underlying device: the result is not necessarily "clean", but it
is consistent.

> Any database being used for an important purpose should be using
> atomic transactions as far as possible, for example.

IIUC the LVM facility described above is indeed meant to allow
preserving the atomicity properties across the LVM layer.


=== Stefan

Reply via email to