On Thu, 1 Feb 2007, [EMAIL PROTECTED] wrote: > Quoting Otto Moerbeek <[EMAIL PROTECTED]>: > > > > > On Wed, 31 Jan 2007, Tony Abernethy wrote: > > > > > [EMAIL PROTECTED] wrote: > > > 16 partitions: > > > # size offset fstype [fsize bsize cpg] > > > a: 390721968 0 4.2BSD 2048 16384 328 # Cyl 0 > > > -387620 > > > c: 390721968 0 unused 0 0 # Cyl 0 > > > -387620 > > > > > > Most likely, the disklabel or boot code > > > or whatever occupies the initial sector(s) > > > is being interpreted as disk usage by the partition. > > > > > > Start the partition 1 cylinder in from the beginning. > > > > See http://www.openbsd.org/faq/faq4.html#blankfdisk > > > > On i386 and amd4, always use fdisk -i on a new disk before creating the > > disklabel. If you do that, disklabel will do the right thing > > automatically. > > We have a winner here! :-) > > I realized after running 'fdisk -i wd1' and then 'disklabel -E wd1' that my > previous use of disklabel had the partition starting at offset 0, not offset > 63 as expected. After recreating the disklabel this way and re-running newfs, > I get a much happier result: > > -bash-3.1$ df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/wd0a 7.3G 79.1M 6.9G 1% / > /dev/wd0d 22.0G 512M 20.4G 2% /usr > /dev/wd0e 7.2G 6.8M 6.8G 0% /var > /dev/wd1a 183G 2.0K 174G 0% /mnt > > ...though to be honest I would have *never* figured that out based on the > above-mentioned FAQ entry. Would it make sense if I wrote an addition to the > entry giving this sort of scenario as an example, or is that overkill?
It's spelled out in http://www.openbsd.org/faq/faq14.html#NewDisk Though I don't like the way this section talks about the hard way to create a disklabel first, and then mentions disklabel -E (with a geometry caveat that is probably scary for a lot of people). In my experience, I never had problems with disklabel -E and geometry. When I install a new disk on a i386 or amd64, I blindly do: # fdisk -i wd1 # disklabel -E wd1 d a a a [press enter a few times, except for size] a b [press enter a few times, except for size] a d etc ... q y To create the partitions I want and leave the calculations to disklabel. Don't forget to use M, G, *, % and & suffixes for the sizes entered. So indeed, rewriting this section is on my list of things to to. -Oto