From owner-freebsd-stable@FreeBSD.ORG Tue Jun 13 10:19:35 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FB3F16A41A for ; Tue, 13 Jun 2006 10:19:35 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3987A43D49 for ; Tue, 13 Jun 2006 10:19:33 +0000 (GMT) (envelope-from zbeeble@gmail.com) Received: by ug-out-1314.google.com with SMTP id j40so444007ugd for ; Tue, 13 Jun 2006 03:19:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EmqdOnhV1xT7m2HVpwwdmqSF+1gFjWXhmSvi/d58R9mfsmlURcTCgA0fepgYZPsVWzCZpjQot+ujiMPoir5SQYLJDg/yEhj1xpXENlQJOvDiy/2pmP4AKRpq/ZXvbYxJqcPZKx1I+m2974sGoD0L6XpdnnTM88kDw/p/63M1D78= Received: by 10.67.15.3 with SMTP id s3mr5570954ugi; Mon, 12 Jun 2006 13:44:48 -0700 (PDT) Received: by 10.67.96.5 with HTTP; Mon, 12 Jun 2006 13:44:48 -0700 (PDT) Message-ID: <5f67a8c40606121344g18d53ce9x4038384a734c3ce0@mail.gmail.com> Date: Mon, 12 Jun 2006 16:44:48 -0400 From: "Zaphod Beeblebrox" To: "=?ISO-8859-1?Q?Bj=F6rn_K=F6nig?=" , stable@freebsd.org In-Reply-To: <20060612193427.GE1226@roadrunner.aventurien.local> MIME-Version: 1.0 References: <448B0419.3090303@cs.tu-berlin.de> <20060612193427.GE1226@roadrunner.aventurien.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: unmounting a filesystem safely that doesn't exist anymore X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 10:19:35 -0000 On 6/12/06, Ulrich Spoerlein wrote: > > Bj=F6rn K=F6nig wrote: > > > I did a mistake: I unplugged my digital camera accidentally before I > unmounted the > > filesystem. *doh* This happens very often, because I'm very > scatterbrained. =3D) The kernel > > will panic and all filesystems remain unclean in any case now. I know > that this is a well > > know issue and in past discussions you stated that this behaviour is > intended and won't be > > changed ad hoc. I just want to know if somebody knows a workaround or > small trick that > > prevents the other filesystems from being unclean on next boot-up. > > You might give the automounter (am-utils) a whirl. They are very > confusing to set up, but you can set the unmount-if-unused timeout to > something like 5 seconds. This could narrow the window enough to not > panic you system frequently :) That's rather hackish ... especially since this is a common problem and a rather obvious hole in using FreeBSD for noobs. It seems that a better solution would be to allow filesystems to be mounted with a 'sync' flag. Or even an ULTRA-sync flag. Meaning strict sync semantics and even 'sync' running against the FS every few seconds. If a filesystem so-mounted completely disappears (or errors out), then it should just go "poof" as if it was umount -f'd.