From owner-freebsd-stable@FreeBSD.ORG Tue Aug 28 02:51:56 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44281106564A for ; Tue, 28 Aug 2012 02:51:56 +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 0962F8FC08 for ; Tue, 28 Aug 2012 02:51:55 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q7S2ptxW073119; Mon, 27 Aug 2012 20:51:55 -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 q7S2pq7X073116; Mon, 27 Aug 2012 20:51:52 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 27 Aug 2012 20:51:52 -0600 (MDT) From: Warren Block To: Kevin Oberman In-Reply-To: Message-ID: References: <2d4dfcb2637f4d0e9671899538b603d9@xtaz.co.uk> <67DFAA78-A9A2-49F9-9C29-CA5653ECE3C0@lassitu.de> <20120827172650.7e6a7685@AMD620.ovitrap.com> <78f8335e54e04f158609f0382afb8d4d@xtaz.co.uk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 27 Aug 2012 20:51:55 -0600 (MDT) Cc: Erich Dollansky , freebsd-stable@freebsd.org, Stefan Bethke , Matt Smith 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: Tue, 28 Aug 2012 02:51:56 -0000 On Mon, 27 Aug 2012, Kevin Oberman wrote: > On Mon, Aug 27, 2012 at 1:16 PM, Warren Block wrote: >> On Mon, 27 Aug 2012, Kevin Oberman wrote: >> >>>> No obvious problems jumped out at me. Here are my notes: >>>> http://www.wonkity.com/~wblock/docs/html/disksetup.html >>>> >>>> The gpart version is halfway down. I really need to switch that around. >>> >>> >>> Pretty good page, but I would really suggest that you also do either >>> 4k or 1M alignment on your partitions. If you don't and use a disk >>> with 4K blocks (internally), you will have terrible performance. >> >> >> You mean add the -a parameter for gpart? All that -a does is round >> partition starting blocks and sizes to even values. If the numbers given >> are already even multiples, it does nothing. > > You can force alignment by use of -b. I just managed to miss that you > were doing that. '-a' simply does the alignment and I have no reason > to forces the location of any partition as all are multiples of 1M and > 4K. Use of -a and -b on the same command seems rather useless, Might make more sense if -a is seen as a safety check. And yes, -b is an exception, done in this case to get the first partition at a specific spot. > but it seems that ignoring -b is still a bug. Works for me in 9-stable. Here's the change in -head: http://svnweb.freebsd.org/base/head/sbin/geom/class/part/geom_part.c?r1=229916&r2=235033 It was MFCed to 8-stable and 9-stable on 2012-05-11. > I'm not sure I get your statement that "All that -a does is round > partition starting blocks and sizes to even values. " -a aligns the > start of every partition to the stated size (as your example showed). Sorry, I should have been more precise with the wording. By "even" I meant even multiple of the given block value. >> The reason -a4k is not shown there is because until a few months ago, -a >> overrode -b. So >> >> # gpart add -t freebsd-ufs -l gprootfs -a4k -b 1M -s 2G da0 >> >> did not start that partition at 1M, but instead at the next even 4K block >> after the first 512K partition; block 1064 instead of block 2048, AFAIR. >> The fix to gpart (thanks to ae@) is in 9-stable and 9.1, but not earlier >> releases. >> >> Mentioned a little farther down in the article is that keeping additional >> partitions to even multiples of 1M or 1G size will keep them in alignment. >> >>> 1M is recommended by Microsoft and used by Windows, but seems a bit >>> excessive to me. >> >> >> Also by some Sun RAID controllers and other systems. 1M is a nice even >> multiple of a lot of common block sizes. > > True, but so is 4K (8-512 byte blocks). Obviously 1M is also a > multiple of all powers of 2 below it as is 4K. Even in this age of > cheap disks, 1G alignment seems a bit extreme, but in most cases, it Er, 1M. It leaves a little less than 512K of unused space. Starting at 1G would be a more difficult decision for me, though you're right that it's a trivial amount of space on a lot of computers. > really is insignificant for general purpose systems. It is an argument > for single partitions, but I always worry that something screwy will > blow up /var with log messages and I would not want this to fill all > disk space, so I like to keep that, as well as a read-only root. Just > old-fashioned, I guess. Understood. Usually separate filesystems for me, although I recently took to using tmpfs for /tmp.