From owner-freebsd-current@FreeBSD.ORG Wed Oct 14 13:10:29 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28154106566B for ; Wed, 14 Oct 2009 13:10:29 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout7.freenet.de (mout7.freenet.de [IPv6:2001:748:100:40::2:9]) by mx1.freebsd.org (Postfix) with ESMTP id B88928FC1C for ; Wed, 14 Oct 2009 13:10:28 +0000 (UTC) Received: from [195.4.92.27] (helo=17.mx.freenet.de) by mout7.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #92) id 1My3cZ-0004ij-Ky; Wed, 14 Oct 2009 15:10:27 +0200 Received: from tfcfa.t.pppool.de ([89.55.252.250]:13480 helo=ernst.jennejohn.org) by 17.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1My3cZ-0005DK-AO; Wed, 14 Oct 2009 15:10:27 +0200 Date: Wed, 14 Oct 2009 15:10:26 +0200 From: Gary Jennejohn To: Alexander Best Message-ID: <20091014151026.699a5765@ernst.jennejohn.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.2; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: buffers not syncing correctly during shutdown X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2009 13:10:29 -0000 On Wed, 14 Oct 2009 12:49:54 +0200 (CEST) Alexander Best wrote: > hi there, > > to keep it short: > > 1. mount a removable device (e.g. an usb stick) (better use -r to prevent data > loss) > 2. unplug the device (without unmounting it) > 3. `shutdown -r now` > > what happens is that the usual shutdown routine gets processed until all > buffers are synced, but then the system stalls. > > after resetting the system all devices (which were supposed to be synced) are > marked dirty and are being fsck'ed. > > cheers. > alex > > oh...and i'm running FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r197914: > Sat Oct 10 02:58:19 CEST 2009 root@otaku:/usr/obj/usr/src/sys/ARUNDEL > i386 > I'm inclined to say that umount'ing the file systems is failing because you pulled the USB stick out without doing umount. Of course, that results in all file systems still being marked dirty. Obviously, this pathological case isn't being handled. I personally don't see why it ever should be handled. This is UNIX not Windows and users should be smart enough to know that they umount such devices before removing them otherwise nasty things can happen. --- Gary Jennejohn