From owner-freebsd-stable@FreeBSD.ORG Tue Aug 28 01:16:26 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 58591106566B for ; Tue, 28 Aug 2012 01:16:26 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id D30648FC18 for ; Tue, 28 Aug 2012 01:16:25 +0000 (UTC) Received: by weyx56 with SMTP id x56so11759310wey.13 for ; Mon, 27 Aug 2012 18:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yumxrXpil2pv+zk9MrPYTBJ30WiK8DlqVhLi7s7ggCE=; b=JuQ9LxHWywh4PJSSqIf8jGttglWd5MjtsdVwMLhAcYxQyXDYTI87X6wdWvehtEsBCn 57L8t++9xAy6Zc7RDJvJ402Aux78Mt5+gAW3QFdRJKGdkfvcDx7mQW06ID6a5ttfb5zr dZ94Zb25spexoMCITsw9DieKtk53TW04JQJ5cGT05uD9PPqaZVdS9Dps4EzSosCaOHH9 yLYrAd4RPO5TeccQVZrt5IPl1WVVQ4D4AmLdCu1fcBmPaptWuKf+LMpGjMaLoZDKKCp1 g30xLc/XtdRucBunm1jebMnX0iZ1D7JoIn+YcXE2FZDPA9SgWrud1JU3I/LdVA7h4yGa A3cQ== MIME-Version: 1.0 Received: by 10.180.103.136 with SMTP id fw8mr29197223wib.20.1346116583792; Mon, 27 Aug 2012 18:16:23 -0700 (PDT) Received: by 10.223.63.76 with HTTP; Mon, 27 Aug 2012 18:16:23 -0700 (PDT) In-Reply-To: References: <2d4dfcb2637f4d0e9671899538b603d9@xtaz.co.uk> <67DFAA78-A9A2-49F9-9C29-CA5653ECE3C0@lassitu.de> <20120827172650.7e6a7685@AMD620.ovitrap.com> <78f8335e54e04f158609f0382afb8d4d@xtaz.co.uk> Date: Mon, 27 Aug 2012 18:16:23 -0700 Message-ID: From: Kevin Oberman To: Warren Block Content-Type: text/plain; charset=UTF-8 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 01:16:26 -0000 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, but it seems that ignoring -b is still a bug. 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). > > 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 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. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com