Date: Mon, 27 Aug 2012 18:16:23 -0700 From: Kevin Oberman <kob6558@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: Erich Dollansky <erichfreebsdlist@ovitrap.com>, freebsd-stable@freebsd.org, Stefan Bethke <stb@lassitu.de>, Matt Smith <matt@xtaz.co.uk> Subject: Re: 9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown Message-ID: <CAN6yY1vLm7Cbri-1JoJs2dd9=jgYQRp0WPFB3c-wDyHv6vY95Q@mail.gmail.com> In-Reply-To: <alpine.BSF.2.00.1208271356560.49435@wonkity.com> References: <2d4dfcb2637f4d0e9671899538b603d9@xtaz.co.uk> <67DFAA78-A9A2-49F9-9C29-CA5653ECE3C0@lassitu.de> <b98001dbe576eafcf4f4500e975680ec@xtaz.co.uk> <20120827172650.7e6a7685@AMD620.ovitrap.com> <c5c51c674a29c136f0d10a3fe936a6a0@xtaz.co.uk> <alpine.BSF.2.00.1208270750130.46223@wonkity.com> <78f8335e54e04f158609f0382afb8d4d@xtaz.co.uk> <alpine.BSF.2.00.1208271230360.48366@wonkity.com> <CAN6yY1u1bJm_dBNKx4_rZkhgpevX6ovm1cyPeu5%2B929HSZWvZQ@mail.gmail.com> <alpine.BSF.2.00.1208271356560.49435@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 27, 2012 at 1:16 PM, Warren Block <wblock@wonkity.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1vLm7Cbri-1JoJs2dd9=jgYQRp0WPFB3c-wDyHv6vY95Q>