can snapshots become corrupted ? Is fsck'ing /dev/md0 sensible ?

Oliver Fromme olli at
Sat Jan 21 07:50:10 PST 2006

Joe Schmoe <non_secure at> wrote:
 > Let's say I have a running filesystem, and the system
 > crashes, and (for whatever reason) I mount and run the
 > filesystem in an unclean state.  While in this
 > unclean, running state, I create a snapshot on it.
 > Now let's say I unmount the filesystem and fsck it for
 > real.  It gets marked clean.  Is the snapshot that
 > resides on that filesystem still dirty ?

Disclaimer:  I haven't tried that, so this is just theory.

Yes, the snapshot is probably still "dirty".  But it
shouldn't matter, because you can only mount it read-only

 > If so, is it expected that use of the clean FS with
 > the dirty snapshot enabled would cause system
 > instability (hard lock of system).

It probably depends how "dirty" it is.  If you had soft-
updates enabled and the disk is reliable (i.e. not an
IDE/ATA disk with write-cache enabled), then there are
only unused blocks not marked as free.  It is save to
mount such a filesystem.  But in all other cases, mounting
a dirty filesystem read/write (forcibly) can indeed cause
instability.  It doesn't matter if snapshots are involved
or not.

 > If so, is it sensible for me to mount the snapshot on
 > md0 and fsck /dev/md0 ?

I don't think you can fsck a snapshot.  Snapshots are

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD:
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"The last good thing written in C was
Franz Schubert's Symphony number 9."
        -- Erwin Dieterich

More information about the freebsd-fs mailing list