Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2006 16:50:02 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-fs@FreeBSD.ORG
Subject:   Re: can snapshots become corrupted ? Is fsck'ing /dev/md0 sensible ?
Message-ID:  <200601211550.k0LFo2EN050245@lurza.secnetix.de>
In-Reply-To: <20060120070110.80233.qmail@web50908.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Joe Schmoe <non_secure@yahoo.com> 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
anyway.

 > 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
read-only.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601211550.k0LFo2EN050245>