>> Indeed, but filesystems have worked hard (by carefully ordering writes
>> and with the use of journaling) to make sure the "disk" is always in
>> a consistent state in the case of a power loss.
> Yes, but in this case the filesystem is still considered "unclean" and
> needs a (quick) fsck before mounting it. 

They may be "unclean" but they're "consistent" in the sense that some
tool (presumably included in the `mount` procedure) can/will
deterministically and "quickly" bring them to a valid state
corresponding to some specific time before the power loss.

`fsck` in contrast is a costly tool that that's not only slow but can't
provide any guarantees about what's in the end result: it's just making
a best effort to guess a consistent state "near" the mess it received.

> My point was that LVM actively asks mounted filesystems on LVs that are
> snapshotted to bring themselves to a consistent (clean) state before it
> does the snapshot. That was (20 year old) news to me.

I don't know the details of how that is handled, but I don't think you
should presume that it results in a "clean" filesystem.  Instead I'd
expect a filesystem like ext4 to do something like make sure the on-disk
journal covers all changes until "now".


=== Stefan

Reply via email to