[net.unix-wizards] RAxx disk partitons

conley%ukans.csnet@RELAY.CS.NET (Dennis R. Conley) (10/11/86)

Once again, I am compelled to ponder the rationale behind the choice
of partition sizes for RA disks ( in particular, those for ra81's in
4.3 ). It appears that the partitions begin on cylinder boundries, but
end short of cylinder boundries, resulting in chunks of unused sectors
between the partitons. Can anyone out there educate me on the purpose of
this game of "musical sectors", or have I been living in the outback
of Neptune a little too long?

	Thanks in advance,
	
	Dennis Conley
	Systems Programmer
	Computer Science Dept
	University of Kansas

	csnet:	conley@ukans
	bitnet:	conley@ukanvax

roy@phri.UUCP (Roy Smith) (10/17/86)

In article <4539@brl-smoke.ARPA> conley%ukans.csnet (Dennis R. Conley)
wonders about the default 4.2BSD RA-xx partition sizes.

	I never did figure out exactly why the default partition sizes are
as they are.  One of the problems is that it is not easy for the software
to tell if you actually have an RA60, 80, or 81 out there so they make the
start of the last partition high enough to fit on the smallest disk (the
ra80, but it beats me why anybody would buy an ra80 instead of an ra81) and
they let the end float to fill the disk.  On a ra81, that leaves a bunch of
rather small partitions, and one huge one.

	Another problem, I think, is that I've seen DEC literature which
alternately lists the RA81 as having 51 or 52 sectors per track (I believe
51 is the right number, but don't hold me to that).  The UDA-50 does a
pretty good job of hiding cylinder boundaries anyway.

	At any rate, one of the first things I did when I set up 4.2 was to
redefine the partition table in the uda driver.  The comments below explain
my motivation; I hope it makes sense.  In practice, we have /usr on ra0d,
use f and h for user's files, and have /tmp on e.  If we ever got a second
ra81 (not likely, I'd rather buy more eagles for my Suns), I suppose we'd
use ra[123][gh] for additional user space.

Filesystem    kbytes    used   avail capacity  Mounted on
/dev/ra0a       7429    3931    2755    59%    /
/dev/ra0e       7429      53    6633     1%    
/dev/ra0d      96547   79117    7775    91%    
/dev/ra0f      96547   85492    1400    98%    
/dev/ra0h     201054  176378    4570    97%    


 */
 *	Roy Smith, PHRI, 28-May-84
 *	Changed partition table.  The table is hard-wired for a RA-81.
 *	The driving force in the layout was to provide several large
 *	partitions of the same size so that file systems could be
 *	moved around in an emergency.  Partitions 'a' and 'e' are both
 *	the same size and are meant for a root and a backup root.
 *	Partition 'h' is the big one and is for the user's files.
 *	Partition 'd' will hold the /usr file system with all the
 *	optional stuff (ingres, vfont, etc.) and still have plenty
 *	of room for expansion.  Partition 'f' is the same size as 'd'
 *	and is intended for disk-to-disk midnight incremental file
 *	system dumps or for an additional file system.  Partition 'g'
 *	is the concatenation of 'd', 'e', and 'f' and is exactly the
 *	same size as 'h'.  Partition 'b' is for swap. The 4 commonly
 *	used partitions ('a', 'b', 'h', and 'd') are near each other.
 *	Using the backup root on 'e' instead of the standard one on
 *	'a' still leaves you with 4 adjacent file systems.  Of course,
 *	partition 'c' maps the whole disk.
 */

/* THIS SHOULD BE READ OFF THE PACK, PER DRIVE */
struct size {
	daddr_t	nblocks;
	daddr_t	blkoff;
} ra_sizes[8] =
{
	16422,     0,		/* A = cyl 0 - 22	*/
	30702,     16422,	/* B = cyl 23 - 65	*/
	891072,    0,		/* C = cyl 0 - 1247	*/
	202776,    469098,	/* D = cyl 657 - 940	*/
	16422,     671874,	/* E = cyl 941 - 963	*/
	202776,    688296,	/* F = cyl 964 - 1247	*/
	421974,    469098,	/* G = cyl 657 - 1247	*/
	421974,    47124	/* H = cyl 66 - 656	*/
};
/* END OF STUFF WHICH SHOULD BE READ IN PER DISK */
-- 
Roy Smith, {allegra,philabs}!phri!roy
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016

chris@umcp-cs.UUCP (Chris Torek) (10/18/86)

In article <4539@brl-smoke.ARPA> conley%ukans.csnet@RELAY.CS.NET
(Dennis R. Conley) writes:
>Once again, I am compelled to ponder the rationale behind the choice
>of partition sizes for RA disks ( in particular, those for ra81's in
>4.3 ).

`Rationale'?  You mean there is one?

(There is a tiny bit of merit in making the `a' partition the same
size as most other `a' partitions.  But we threw out the `standard'
tables long ago.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu

rbj@icst-cmr.arpa (Root Boy Jim) (10/20/86)

	Once again, I am compelled to ponder the rationale behind the choice
	of partition sizes for RA disks ( in particular, those for ra81's in
	4.3 ). It appears that the partitions begin on cylinder boundries, but
	end short of cylinder boundries, resulting in chunks of unused sectors
	between the partitons. Can anyone out there educate me on the purpose
	of this game of "musical sectors", or have I been living in the 
	outback of Neptune a little too long?
	
It's not only the RA81's. Long ago someone made up tables that were exact
cylinder multiples of some ancient disk, I think it was rp0[4567]'s.

Anyway, I find the defaults pretty bogus and have radically altered the
layouts by editing (and adb'ing) the tables in the driver. Our system has
two DEC rm03's with 50M `a' partitions containing root and user (so I can
use almost anything in /usr in single user mode), and the standard 33440
sectors (17M) used for swap at the end of the disk. For compatibility,
the `g' partition is as it was, the `d' partition looks like the old `a'.

On our rm05, the `d', `e', and `f' split the `h' partition, not `g'.

I won't even mention what we did to our eagle.

To get back to your question, however, it is safe to round up your
partition sizes to even cylinder boundarys, *** except for the last
partition on the disk ***. You must reserve at least two tracks for bad
block info, and I just avoided the last cylinder entirely.

	(Root Boy) Jim Cottrell		<rbj@icst-cmr.arpa>
	Yow!  It's a hole all the way to downtown Burbank!

chris@umcp-cs.UUCP (Chris Torek) (11/02/86)

In article <2452@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>...  One of the problems is that it is not easy for the software
>to tell if you actually have an RA60, 80, or 81 out there

Actually, it is easy; there is a media identifier in the on line
end (response) packet.  There is another (different, printable) ID
in the get unit status end packet.

>Another problem, I think, is that I've seen DEC literature which
>alternately lists the RA81 as having 51 or 52 sectors per track (I
>believe 51 is the right number, but don't hold me to that).  The
>UDA-50 does a pretty good job of hiding cylinder boundaries anyway.

(Perhaps too good.)  The RA81 has 52 sectors per track, but one
sector on every track is reserved for bad block replacement.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu