Subject: Re: Hard drive partitioning
To: None <hotz@jpl.nasa.gov>
From: Ken Nakata <kenn@synap.ne.jp>
List: port-mac68k
Date: 09/15/1998 02:02:14
On Mon, 14 Sep 1998 09:05:39 -0700, Henry B. Hotz wrote:
> At 12:32 PM -0700 9/12/98, Mark de Jong wrote:
> >I was wondering if there's someone who fully understands how to _optimally_
> >partition a hard drive so that no cylinders/sectors are wasted. The
> >engineer/nerd/geek part of me abhors the thought that my hard drive isn't
> >being used optimally. <grin>
> 
> There is no perfect solution, but if you do a disklabel to see how many
> sectors/cylinder are assumed then you can do it.  Put a dummy parition just
> after the partition map/driver partition to get the first real partition to
> line up with a theoretical boundary, then allocate all partitions in sizes
> that are integer numbers of cylinders.

No, no, you have to allocate the FFS partitions in sizes a multiple of
cylinder GROUPS!  And, note that there need not be a dummy partition
immediately after the driver partition to align the successive
partitions.  It could be a MacOS partition or even a Swap partition
since only the FFS partitions care about the drive geometry.  You have
to watch out to align your FFS partitions at cylinder boundaries (and
to make their sizes a multiple of cylinder groups == 16 cylinders),
but everything else can be misaligned.

> You will have to leave a few sectors at the end of the disk unused
> also.

Actually, you could allocate them or leave.  It doesn't matter 'cause
there are not going to be used either way.

My favorite solution is to have the swap partition immediately follow
the partition map or the driver partition, followed by some FFS
partitions, and a MacOS partition at the end.  This way, you can
minimize the number of unused sectors by carefully aligning and sizing
the FFS partitions.  The reason to have swap partition first is that,
besides for aligning the FFS partitions at cylinder boundaries, with
zone recording technique, the outer blocks are transfered at the
higher rate than the inner blocks.  Faster swapping must be a good
thing although I never measured the performance gain.

> It makes things look neater under MacBSD, but remember that this is all
> imaginary.

Not if you are really determined to waste as few sectors as possible.
The wasted sectors by misaligned FFS partitions are real.

> All modern drives use some form of zone recording and the number of
> sectors/cylinder is not constant.

Imaginary is the performance gain which FFS assumes is obtained by
aligning the partitions.

Talk about the partitions, I really need to rearrange my partitions...

Ken