Subject: Re: filesystem layout and disk labeling
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Lazaro Daniel Salem <SALEM@statoil.com>
List: port-hp300
Date: 04/12/1999 16:28:48
Thank you Patrick.

>> So my 1st question is:
>> Can I decide what the size of the "d", "e", "f", "g" and "h" partitions
>> (yes I know a is root, b is swap and c is whole disk ALWAYS).
>> or should be a relation between the sizes of those as suggested
>> in all the entries in /etc/disktab ?.
>
>You can choose whatever you like! (As long as it fits...)

Do you mean
a) I could use eventually "a" or "b" for /usr and "d" for root
or
b) I can use "d", "e", "f", "g", and "h"  for whatever I like.

On my system diskpart without arguments returns usage sintax (at least name
must be given)
So I gave sd0 as a fictitious name  (it will prompt for the required disk
geometry information: dt, ty, nt, ns and nc)

susanita# diskpart Micropolis
Micropolis: unknown disk type, want to supply parameters (y/n)? y
Disk/controller type (SMD)? SCSI
type (winchester|removable|simulated)? winchester
(type <cr> to get default value, if only one)
sector size (512)?
#sectors/track ? 32
#tracks/cylinder ? 64
#cylinders ? 1001
sectors/cylinder (2048)?
Drive-type-specific parameters, <cr> to terminate:
d0?
Micropolis: #sectors/track=32, #tracks/cylinder=64 #cylinders=1001

    Partition      Size  Offset    Range
        a         15884       0    0 - 7*
        b         66880   16384    8 - 40*
        c       2050048       0    0 - 1000
        d         15884  376832  184 - 191*
        e        307200  393216  192 - 341
        f       1349632  700416  342 - 1000
        g       1673216  376832  184 - 1000
        h        291346   83968   41 - 183*

Notice I gave a fictitious "nt" and "ns" value such that 1cyl=1MB as
usually translated
by SCSI disk controllers.  I just inspected the src code of diskpart in:

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/usr.sbin/diskpart/diskpa
rt.c
but I am not sure about the meaning of the "*" at the end of some records
(a,b, d and h)
Maybe indicates the partition not ending at cyl boundary?

I also guess that the filesystem layout behind diskpart was (as of 1993)

a= root      (   7.76 MB)
b= swap      (  32.65 MB)
c=           (1001    MB)
h= /var      ( 143    MB) .....!"h" is "sort of physically" before "d"
d= /var/tmp  (   7.76 MB)        or before "g" = "d"+"e"+"f"... weird?
e= /usr      ( 150    MB)
f= /home     ( 659    MB)
g= /home+/usr/var/tmp  (816.76MB)

Sounds this a reasonable guess ?

Notice that there is no offset for the a partition (no place for
bootblock?)
The reason for "h" physically before "d"+"e"+"f"  could be for tuning?
transportability?

Any ideas about pointers to the reasons behind this layout ?

Thanks,

Lazaro

P.S. please, reply to: lazaro@online.no if possible






"Patrick Welche" <prlw1@newn.cam.ac.uk> on 12.04.99 13:08:57

To:    SALEM@statoil.com (Lazaro Daniel Salem)
cc:    netbsd-help@netbsd.org (bcc: Lazaro Daniel Salem)
Subject:  Re: filesystem layout and disk labeling




Lazaro Daniel Salem wrote:
>
...
>
> So my 1st question is:
> Can I decide what the size of the "d", "e", "f", "g" and "h" partitions
> (yes I know a is root, b is swap and c is whole disk ALWAYS).
> or should be a relation between the sizes of those as suggested
> in all the entries in /etc/disktab ?.

You can choose whatever you like! (As long as it fits...)

> All disktab entries for SCSI are such pb+pg=pd+ph  and ph = pe+pf .

I never noticed... Just thought pa+oa=ob, pb+ob=od pd+od=oe etc seems
sensible.

> And my second question:
> Why does "diskpart -t yourbogusdisk ... " generates a disktab
> that is different from the entries in /etc/disktab even when you
> specify the same parameteres (ns, nt, nc) as in the disktab entry?
> I get now that pg=pd+pe+pf  instead of the relations in /etc/disktab.

Last time I tried, diskpart didn't work at all for me, so I would just
ignore it. Just decide how many partitions you want and how big you
want them to be. Method of getting that decision into the disklabel may
vary - you could add an entry to /etc/disktab for your disk.

Good luck,

Patrick