From owner-freebsd-geom@FreeBSD.ORG Tue Nov 7 12:02:22 2006 Return-Path: X-Original-To: freebsd-geom@FreeBSD.ORG Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEB7816A415 for ; Tue, 7 Nov 2006 12:02:22 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F61143D70 for ; Tue, 7 Nov 2006 12:02:15 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (ixgpkd@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kA7C1ofj044244; Tue, 7 Nov 2006 13:01:55 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kA7C1jST044243; Tue, 7 Nov 2006 13:01:45 +0100 (CET) (envelope-from olli) Date: Tue, 7 Nov 2006 13:01:45 +0100 (CET) Message-Id: <200611071201.kA7C1jST044243@lurza.secnetix.de> From: Oliver Fromme To: freebsd-geom@FreeBSD.ORG, rick-freebsd@kiwi-computer.com In-Reply-To: <20061106212307.GA75478@keira.kiwi-computer.com> X-Newsgroups: list.freebsd-geom User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 07 Nov 2006 13:02:06 +0100 (CET) Cc: Subject: Re: FSCKing a RO partition X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-geom@FreeBSD.ORG, rick-freebsd@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 12:02:23 -0000 Rick C. Petty wrote: > Oliver Fromme wrote: > > > > > > I also tried with the mount command and -u -r options with the same > > > result. > > > > A quick workaround would be to run "fsck -p" yourself on > > the root partition before you remount it read-write. > > Of course, if you mount root read/write in the process of booting > single-user to edit /etc/fstab, for instance, and you decide you want to > preen a la "fsck -p", you can't. Even if you use "mount -u -r /", the > preen fails on the root partition and you can't quickly check the other > file systems. This is a bug and a regression since it used to work in > 4.x just fine! Sure, it's clearly a bug that needs to be fixed. That's why I wrote "workaround" (not "solution"). > Sometimes I'm often tempted to reboot and wait 10 minutes for the BIOS > to POST just because of the effort/time to manually run fsck on each > partition. If you remember to always do "fsck -p" immediately from the > single-user prompt, you're fine. The original poster has a modified init(8) that does the remounting, so there's no need to remember anything. He just has to call "fsck -p" (and check the exit code, of course) from his code right before remounting the root FS read-write. Personally, when I enter single-user mode and need to mount any partition for writing, "fsck -p" is always the first thing I type. It's hardcoded into my fingers (and should be for every admin), so there's nothing to remember either. :-) Just to repeat again: The fact that the standard fsck fails in FreeBSD 6 after the roto FS has been remounted read-only _is_ a bug and a regression. It definitely needs to be fixed. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "The last good thing written in C was Franz Schubert's Symphony number 9." -- Erwin Dieterich