Subject: Re: filesystem layout and disk labeling
To: Lazaro D. Salem <lazaro@online.no>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 04/13/1999 15:26:17
Lazaro D. Salem wrote:
> 
> I read that in the docs but it was not clear to me where to put the users.
> Under root in /home? (sesems obvious,  otherwise why is it /home there?)
> or under /var/users or even /usr/users? Yes, I read that too (the unix way!
> :-)

Where ever. I use /home, but it's up to you!

> >It really is up to you how you want to use it, eg., I have a 135Mb root
> >of which 31Mb are used, a 100Mb /var of which 6Mb are used, 1.6Gb of /usr
> >of which 1.5Gb are used, and 397Mb of /home of which 360Mb are used. (+2
> >lots of 100Mb swap)
> 
> I like the idea of having an almost full /root and /usr and minimum write
> activity on them:

The only reason I have 135Mb root, is because I figure it contains 35Mb at
most, and leaves 100Mb for /tmp. No doubt people will say I should have /tmp
separate, or maybe on a memory disk, but I don't have any evil users on
the system (yet :-) )

> It would be good to do the same with /usr/local and /usr/pkg but those
> are moving targets if one likes to try "new" software. Difficult to
> estimate sizes.

Indeed!

> I was unsure about separates /var and /var/tmp under *BSD...I'll experiment.

Good plan.

> I wonder if usr/pkg has its own tree with libs, etc, and such below it ?
> if not I should rethink the above scheme.

I think that is correct. (Sure about libs, not sure about etc,var)

> >> Notice that there is no offset for the a partition (no place for
> >> bootblock?)
> >
> >The bootblocks live at the beginning of the root partition => no need
> >to reserve extra space.
> 
> I have two comments on your answer:
> 
> 1) The INSTALL for hp300 recommend to reserve space (1 cylinder)
> for the bootblock which is 74kB. Glupp.... 1MB for only 74kb??

OK - so ignore my comments. Maybe someone who uses your architecture
will comment.

> So I consider to use another translation than the 1001 *32*64 so to have
> smaller cylinders and leave only one cylinder large enough for the boot.
> Do you know how far can you go with translation of ns, nt and nc?
> I read old unices had problems with boundaries at the end of cylinderes and
> such, but also read recently that that is not a problem anymore.
> I am not so familiar with the internals of ufs, or the way the netbsd kernel
> treats them. (primary source beside the source code itself?)

It was my impression that as the geometry gets retranslated by the disk
controller anyway, you could effectively use anything as long as the number
of sectors was <= what the disk's advertised geometry has. I tend to use
exactly the geometry it advertises. (But again, I don't know about hp)

> 2) Reading the source code of disklabel.c (or was it diskpart.c?)
> I found that the last "x" even numbered sectors are reserved for
> mapping bad blocks if possible.

Maybe. I thought newfs worried about that..

> Another thing that puzzles me is what NetBSd reports at boot time for this
> disk:
> 1760 cyl, 15 heads, 2015615 blocks (512 bytes/block)
> This is of course is close to the 2050048 blocks from the chs=1001 *32*64
> but assuming 15 heads the resulting number of sectors per track would be
> ns=32 x 64  / 15  which is not an integer... buuhhhh.
> 
> Notice the size reported is slightly larger than the 1001MB figure
> above, but I read that should not matter.

I'm a bit puzzled too, that it didn't advertise sectors per track... I'm used
to eg.:
sd1: 4341MB, 5899 cyl, 10 head, 150 sec, 512 bytes/sect x 8890760 sectors
So then I just use the values as declared, and get
        :pc#8848500:oc#0:\
rather than 8890760 sectors. I tend to go for a geometry that gives total
blocks slighly less than size reported.

> Thanks a lot for this "conversation".

You're welcome! Good luck,

Patrick