Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2006 21:58:19 +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:  <200601212058.k0LKwJ9Q059337@lurza.secnetix.de>
In-Reply-To: <20060121172644.19851.qmail@web50914.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Joe Schmoe <non_secure@yahoo.com> wrote:
 > On Sat, 21 Jan 2006, Oliver Fromme wrote:
 > > Yes, the snapshot is probably still "dirty".  But it
 > > shouldn't matter, because you can only mount it read-only
 > > anyway.
 > 
 > Ok, yes, the snapshot can only be mounted read-only -
 > this is true.  However, the snapshot itself (whether
 > mounted or not) is continually being changed as files
 > are being changed or deleted on the filesystem in
 > question.  So if the snapshot is corrupt, and I start
 > making changes/deletions on the (now clean)
 > filesystem, then wouldn't there be problems ?

That question would have to be answered by a snapshots
expert.  But I guess you're right, there are probably
problems.

 > Ok, understood.  However, once I do a full and
 > successful fsck on that filesystem, it is completely
 > safe again, regardless of how long or how often I ran
 > it while it was dirty, right ?

Right, provided the dirtyness was only soft-updates
related and the disks were reliable.

 > [...]
 > The second question I need to ask is, when I am
 > rsyncing this filesystem to a remote host, why is it
 > not a read-only operation ?  My rsync process, because
 > this filesystem was the _source_, and not the
 > destination, should not have written anything to this
 > filesystem.  However, it succeeded when the fs was
 > read-only (softupdates were off) and it failed when
 > the filesystem was read-write (softupdates on).  Is
 > there some kind of manipulation of the source
 > filesystem that rsync does that would be equal to a
 > lot of writing to the source disk ?

When you read from a file, its atime (access time) is
scheduled for an update (unless the FS is mounted with
the "noatime" flag).  That's a write operation.
So when you rsync a lot of files, quite a lot of meta
data updates can pile up.  That happens only if the
FS is mounted read-write, of course.

 > It is my understanding that soft-updates only deal
 > with writes to the disk

That's right.

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.

"Being really good at C++ is like being really good
at using rocks to sharpen sticks."
        -- Thant Tessman



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