From owner-freebsd-stable@FreeBSD.ORG Mon Aug 27 13:56:18 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9914D106566B for ; Mon, 27 Aug 2012 13:56:18 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 369948FC14 for ; Mon, 27 Aug 2012 13:56:17 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q7RDuFHP046743; Mon, 27 Aug 2012 07:56:15 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q7RDuERQ046740; Mon, 27 Aug 2012 07:56:15 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 27 Aug 2012 07:56:14 -0600 (MDT) From: Warren Block To: Matt Smith In-Reply-To: Message-ID: References: <2d4dfcb2637f4d0e9671899538b603d9@xtaz.co.uk> <67DFAA78-A9A2-49F9-9C29-CA5653ECE3C0@lassitu.de> <20120827172650.7e6a7685@AMD620.ovitrap.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 27 Aug 2012 07:56:15 -0600 (MDT) Cc: Erich Dollansky , freebsd-stable@freebsd.org, Stefan Bethke Subject: Re: 9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown 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: Mon, 27 Aug 2012 13:56:18 -0000 On Mon, 27 Aug 2012, Matt Smith wrote: > On 2012-08-27 11:26, Erich Dollansky wrote: >> I would run plain UFS for / /var and /tmp and see what will happen then. >> >> I know what you will answer. But it will help to isolate the problem. >> > > Did you mean not use the label at all? If so I just tried this. Set > /dev/ada0p2 in the fstab. No change. Still get the same issue. > > This might help investigations as I wrote down what I did to install it. > > The way I created this filesystem was that I dropped out of the installer to > a shell because I wanted to do the 4k alignment. And I ran this: > > gpart create -s gpt ada0 > gpart add -t freebsd-boot -l gptboot -s 512k ada0 > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > gpart add -t freebsd-ufs -l gptroot -b 1M -s 586G ada0 > gpart add -t freebsd-swap -l gptswap ada0 > gpart show > > => 34 1250263661 ada0 GPT (596G) > 34 1024 1 freebsd-boot (512k) > 1058 990 - free - (495k) > 2048 1228931072 2 freebsd-ufs (586G) > 1228933120 21330575 3 freebsd-swap (10G) > > newfs -U -j -L root /dev/gpt/gptroot > glabel label root /dev/ada0p2 > glabel label swap /dev/ada0p3 > mount /dev/gpt/gptroot /mnt > vi /tmp/bsdinstall_etc/fstab > > # Device Mountpoint FStype Options Dump Pass# > /dev/label/root / ufs rw 1 1 > /dev/label/swap none swap sw 0 0 Stefan called it. The newfs is done on /dev/gpt/gptroot, no problem there. But when glabel writes to /dev/ada0p2--which is /dev/gpt/gptroot, same thing, it overwrites the last block. And then the filesystem is mounted with the glabel device, which is actually one block smaller than the filesystem expects. Could be either the filesystem or GEOM that's causing the failure at shutdown. Happily, those glabels aren't accomplishing anything useful and can be skipped. Removing the glabels and changing the devices in fstab might be enough. A more cautious approach would be to back up, newfs, skip the glabel step, and then change the devices in fstab.