From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 2 13:28:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37ABD16A406 for ; Fri, 2 Mar 2007 13:28:02 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 08D1113C4A3 for ; Fri, 2 Mar 2007 13:28:01 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l22DS0dW004452; Fri, 2 Mar 2007 07:28:01 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45E82660.4030107@freebsd.org> Date: Fri, 02 Mar 2007 07:28:00 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Steven Hartland References: <00cb01c75c5b$4205e390$b3db87d4@multiplay.co.uk> In-Reply-To: <00cb01c75c5b$4205e390$b3db87d4@multiplay.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2697/Fri Mar 2 06:02:13 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: sysinstall creates corrupt filesystems after repartitioning X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 13:28:02 -0000 On 03/01/07 17:42, Steven Hartland wrote: > I've been repartitioning some of our machines here and > found that using the following method sysinstall creates > corrupt filesystems. > > 1. Boot a machine using an nfs mounted /usr > 2. Run: sysctl kern.geom.debugflags=16 to enable writing > to the disk mbr > 3. run sysinstall, Customise -> Label > 4. Delete the /usr partition e.g. /dev/da0s1f > 5. Create two partitions from the space left as ufs with > mount points /usr and /data > 6. Write the changes. > > Now two strange things happen: > 1. /usr ends up mounted twice once from nfs and once > from the new ufs. This requires umount -f /dev/da0s1f to > correct but doesnt always work properly requiring a reboot > to restore system functionality. > 2. The FS on both partitions is totally corrupt even fsck > cant repair them, even after a reboot. > > So the question is why would sysinstall create two corrupt > FS's with this procedure? > > Fixing is trivial just rerun the newfs commands and all > is good but its really odd that they should be corrupt > in the first place and caught me out big time when I first > did this as I had restored a full dump back onto /usr > and rebooted only for it to blow up horribly as the fs > was so badly corrupted. > > Steve I don't know about the fs corruption, but the double mounts is something you asked it to do (maybe unknowingly). When you added that partition, one of the options is to mount it. Eric