Subject: re: Swap beginning with cylinder 0
To: None <tech-kern@NetBSD.ORG, phil@steelhead.cs.wwu.edu>
From: David Seifert <seifert@sequent.com>
List: port-pc532
Date: 05/23/1996 10:07:04
[ For those just tuning in, this is a discussion regarding
having the swap partition skip a few sectors to avoid tromping
on the disk label, from the tech-kern list. ]

In message <199605231007.GAA08916@Collatz.McRCIM.McGill.EDU>you write:
> > Seems to me the clean solution is to have a boot partition and a swap
> > partition, as some systems do.
> 
> You mean a separate partition containing exactly and only the label and
> boot area?

That is one possibility.  If I remember correctly, the 532 port
has a partition for holding bootfile(s), which comes after the disk
label.  The disk label is not included in the boot partition, and
doesn't have a partition of its own.  You have to use the "whole disk"
partition to access the disk label.  The swap partition is only
used for swap.

Thus the boot partition does not start at a cylinder boundary.
The swap partition may or may not start at a cylinder boundary.
(With current SCSI drives one typically has to go through a lot
of work to find out where the real cylinder boundaries are anyway.)

> > This does use up a partition, which brings up something I've been
> > wondering about awhile: why do we have a limit of only 8 partitions?
> > And how much grief would it be to expand this to, say, 16?
> 
> It would be completely impossible for boot disks on ports that are
> stuck with compatability disklabels for their boot disks...like my
> favorites, the sparc and sun3 ports, where the boot disk's label has to
> be acceptable to the ROMs.
> 
> Also, at least the sparc and sun3 compatability labels force you to
> begin partitions on cylinder boundaries.

How about for systems that don't need to be compatible with anything?

> But even aside from those, this really doesn't help; it just pushes the
> problem off to the user, who then has to know enough to avoid placing
> the swap partition overlapping the boot stuff.

The sysadmin had better know which parts of their disk are being used
for what data when they allocate disk space.  Having a separate
partition for things like disklabels and bootstraps makes it
clear what that part of the disk is really being used for, and
how large it is.  Otherwise what happens if they say, "Hmmm, I
need a raw disk partition for this database.  I have more swap space
than I need, I'll convert this swap partition to a database partition."?

-Dave