From owner-freebsd-questions@FreeBSD.ORG Tue Jun 12 03:49:53 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23E5516A538 for ; Tue, 12 Jun 2007 03:49:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id DE18B13C569 for ; Tue, 12 Jun 2007 03:49:52 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id l5C3nl9N047834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 11 Jun 2007 20:49:52 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id l5C3nkWX047832; Mon, 11 Jun 2007 20:49:46 -0700 (PDT) Received: from fbsd61 ([192.168.200.61]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA07726; Mon, 11 Jun 07 20:01:55 PDT Date: Mon, 11 Jun 2007 20:05:12 -0700 From: perryh@pluto.rain.com To: kris@obsecurity.org Message-Id: <466e0d68.CIFJDnc9PBwkmMtQ%perryh@pluto.rain.com> References: <64c038660706111652p311c6d84i1ec295edcfc16994@mail.gmail.com> <20070611201714.35153d92.wmoran@potentialtech.com> <20070612012430.GA6276@rot13.obsecurity.org> In-Reply-To: <20070612012430.GA6276@rot13.obsecurity.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: umount -f X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2007 03:49:53 -0000 > > > 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.