From owner-freebsd-questions@FreeBSD.ORG Tue Feb 1 11:23:38 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1464816A4CE for ; Tue, 1 Feb 2005 11:23:38 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id EED7F43D2D for ; Tue, 1 Feb 2005 11:23:36 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j11BNGYs019188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Feb 2005 03:23:17 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j11BNFi9019186; Tue, 1 Feb 2005 03:23:15 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Tue, 1 Feb 2005 03:23:15 -0800 From: "Loren M. Lang" To: Giorgos Keramidas Message-ID: <20050201112315.GH8619@alzatex.com> References: <20050131110432.GD8619@alzatex.com> <20050201041642.GA1733@oliverfuchs.onlinehome.de> <20050201055342.GC776@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050201055342.GC776@gothmog.gr> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: FreeBSD Mailing list Subject: Re: mounted ext2 fs causes bad shutdown X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2005 11:23:38 -0000 On Tue, Feb 01, 2005 at 07:53:42AM +0200, Giorgos Keramidas wrote: > On 2005-02-01 05:16, Oliver Fuchs wrote: > >On Mon, 31 Jan 2005, Loren M. Lang wrote: > >> On a FreeBSD 5.3 system of mine that is dual boot with linux I have > >> my linux home partition which is ext3fs mounted on freebsd. Anytime > >> I reboot or halt freebsd while it is mounted, freebsd fails to sync > >> all it's buffers. > > > > You first have to umount the linux partition. I have this uncommented > > in my /etc/rc.shutdown (I have it from the list): > > > > #extfs=`eval mount | grep ext2fs | awk '{print $1 }'` > > #for _elem in $extfs; do > > # echo -n "Unmounting ext2/ext3 filesystems: " > > # umount -a -t ext2fs > > # echo -n "$_elem " > > #done > > # > > #echo '.' > > #exit 0 > > What you have is not correct. > > A more correct approach would be to actually *USE* the _elem iterator in > the loop, instead of just echoing it. > > There is also a bug lurking in there. The script prints the > "Unmounting" message once for each unmounted filesystem. > > One of the many ways to do the same thing without the bugs could be: > > # extfs=$(mount | grep '^/.*(ext2fs,' | awk '{print $1}') Actually, better than that would be extfs=$(mount -t ext2fs | awk '{print $1;}') Or even just replace the whole thing with "umount -a -t ext2fs" > # if [ -n "${extfs}" ]; then > # echo -n "Unmounting ext2/ext3 filesystems:" > # for _elem in ${extfs} ;do > # umount "${_elem}" && echo -n " ${_elem}" > # done > # echo '.' > # fi > # unset extfs > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C