atom feed22 messages in org.freebsd.freebsd-stableRe: Disklabel 101?
FromSent OnAttachments
RasputinApr 5, 2001 3:16 am 
The BabblerApr 6, 2001 9:27 pm 
Mike MeyerApr 7, 2001 2:48 am 
Mike BartonApr 7, 2001 7:23 am 
Dinesh NairApr 7, 2001 8:49 am 
Mike MeyerApr 7, 2001 11:52 am 
Mike MeyerApr 7, 2001 10:00 pm 
Gregory BondApr 8, 2001 6:54 pm 
Pete FrenchApr 9, 2001 3:22 am 
RasputinApr 9, 2001 3:58 am 
Mike MeyerApr 9, 2001 4:55 am 
Pete FrenchApr 9, 2001 5:00 am 
Mike MeyerApr 9, 2001 5:05 am 
Mike BartonApr 9, 2001 5:07 am 
Pete FrenchApr 9, 2001 5:32 am 
Andrew HesfordApr 9, 2001 7:51 am 
David WolfskillApr 9, 2001 9:16 am 
Andrew HesfordApr 9, 2001 10:38 am 
Gerhard SittigApr 9, 2001 11:51 am 
Peter JeremyApr 9, 2001 2:44 pm 
John LoVersoApr 10, 2001 8:25 am 
John LoVersoApr 10, 2001 8:28 am 
Subject:Re: Disklabel 101?
From:Mike Meyer (mw@mired.org)
Date:Apr 7, 2001 10:00:05 pm
List:org.freebsd.freebsd-stable

Mike Barton <mi@dad.state.vt.us> types:

Are there any issues with placing swap first on the hard drive? Unless you insist on filling the drive, it seems to me that this swap arrangement would result in less stack travel.

Not that I know of. In fact, I'm pretty sure that one of my systems has root on s2, with swap on s1, which is earlier on the hard disk.

The idea behind root being first was similar, with root having the most used files on it. For instance, every time you open a file with an absolute path - say, by finding it on your command search path - you start with the root directory. Then again - the geometry of modern diskdrives is seriously non-intuitive.

Final note - John Loverso pointed out to me that the current kernel does indeed expect c to be the entire slice. At the very least, it has to have the partition table in it. It's not clear what will fail if you make it cover the first part of the disk, but not the entire disk.

I think I'm going to add playing with this to my list of things to do....

<mike

----- Original Message ----- From: "Mike Meyer" <mw@mired.org> To: "The Babbler" <bt@babbleon.org> Cc: "Rasputin" <rara@virgin.net>; <sta@freebsd.org> Sent: Saturday, April 07, 2001 5:48 AM Subject: Re: Disklabel 101?

The Babbler <bt@babbleon.org> types:

Rasputin wrote:

man disklabel etc all assume you know what those letters mean. I know c is the whole partition, but that's it.

c = entire disk a = root b = swap d = ??? I don't know; it's never used e+ = other partitions.

BTW, does anybody know *why* BSD uses such a bizarre scheme?

BSD does it this way because the Unix it was based on did it. This dates back to at least v6, where I first met it. Root and swap used to be wired into the kernel at config time, and making the first two partitions the system had to find while booting the first two in the table does make sense. C was required and unusuable; it included the cylinders that were reserved for bad block handling, and the tools that did that assumed it was there. It was also used for disk-disk backups at times.

At the time, computers were typically used by more than one department at a time. This led to even more reasons to want to partition a disk. If memory serves, partition table information used to be in the kernel - wired into the driver for that disk - so all disks of the same type had to have the same partition table. So it was useful to stagger the partition sizes to provide more choices. A typical setup might have f, g and h about the same size and covering the entire disk. e was what was left in f after a & b were taken out. d was the usable disk beyond a & b (or something like that).

The only thing that's still hardwired is that root has to be on a. The boot sequence is fubar if you don't do that, though it's been claimed that that's not hard to fix. The rest you can do pretty much any way you please. I.e. - you don't need swap at all, and I've got one system that has swap on a different slice than it's root file system.

<mike

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message