Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jun 2007 20:05:12 -0700
From:      perryh@pluto.rain.com
To:        kris@obsecurity.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: umount -f
Message-ID:  <466e0d68.CIFJDnc9PBwkmMtQ%perryh@pluto.rain.com>
In-Reply-To: <20070612012430.GA6276@rot13.obsecurity.org>
References:  <64c038660706111652p311c6d84i1ec295edcfc16994@mail.gmail.com> <20070611201714.35153d92.wmoran@potentialtech.com> <20070612012430.GA6276@rot13.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 1. If I use "umount -f /dev/ad4s1a" to forcefully umount a
> > > file system, does this jeopardize the integrity of said
> > > file system? Like...will it jerk the run out from under
> > > a process in the middle of a disk write, thus leaving a
> > > half written file, or will it wait until the write is
> > > complete? (I guess this would largely depend on the
> > > disk controller?)
> > 
> > I don't believe there are any guarantees if your -f it.
> > The filesystem will probably be OK, but I would expect
> > files to get corrupt.
>
> Shouldn't happen, if it does it's a bug.

umount -f should not corrupt the filesystem, IOW "fsck" of an
FS immediately after "umount -f" should not report anything
more serious than some homeless files (if the last link had
been removed, but the inode had not been released because some
process still had it open).

However data corruption seems likely if it yanks the rug
out from under a process that has, say, written part of a
transaction to a database file.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?466e0d68.CIFJDnc9PBwkmMtQ%perryh>