I'm curious - why does relink happen under /usr ?

I would expect such transient activities - like storage of
temporary object files - to occur under /var somewhere. I'm
sure there's a good reason for the choice, but at first glance
it doesn't make a whole lot of sense.

It might also help resolve this ongoing issue with relink in
corner-case conditions (I too have battled the same issue as
Henrich with /usr filling up in various ways on small disks).

FWIW I tend to size /var with consideration it will grow over
time, for archiving logs and such. To me, /usr should be more
deterministic.

Per FHS, /usr should be able to be mounted read-only and able
to be exported over NFS and shared across hosts.

Regards
Lloyd

Stuart Henderson wrote:

> On 2025/11/13 22:13, H. Hartzer wrote:
> 
> > Hi bugs@,
> > 
> > I installed 7.8 with VMM to a 12.5GB disk. I chose the automatic
> > partitioning defaults, and /usr is too small to relink the kernel with.
> > I used x86_64.
> 
> 
> yeah, there are various disk sizes where disklabel -A makes bad choices
> and in the worst cases just plain don't work.
> 
> > a: 213.5M 64 4.2BSD 2048 16384 1 # /
> 
> 
> that is rather optimistic. 256 would be better but I like to go with
> closer to 1G or so.
> 
> > b: 207.0M 437280 swap
> > c: 12800.0M 0 unused
> > d: 221.6M 861216 4.2BSD 2048 16384 1 # /tmp
> > e: 245.1M 1315008 4.2BSD 2048 16384 1 # /var
> 
> 
> it's not very fun when /var runs out of space and this is tight too.
> 
> > f: 1627.0M 1816928 4.2BSD 2048 16384 1 # /usr
> > g: 422.1M 5148992 4.2BSD 2048 16384 1 # /usr/X11R6
> 
> 
> for syspatch/reorder_kernel and some hope of sysupgrade working you
> really don't want less than 2.5GB (more if /usr/X11R6 is not a separate
> filesystem), typically I use single fs for /usr and X11R6 and give it
> 8-10GB or so.
> 
> > h: 1214.5M 6013440 4.2BSD 2048 16384 1 # /usr/local
> 
> 
> as with many disk sizes (check src/regress/sbin/disklabel for examples),
> this is too small for much use of packages.
> 
> > i: 2073.4M 8500704 4.2BSD 2048 16384 1 # /usr/src
> > j: 5170.8M 12747008 4.2BSD 2048 16384 1 # /usr/obj
> 
> 
> providing for /usr/src and /usr/obj on such a small disk doesn't seem a
> smart choice. they can't really be shrunk below a certain minimum
> otherwise they're not useful, but on various size disks they're burning
> space badly needed elsewhere. I think they should be skipped unless the
> more critical fs are above a certain minimum saner size.
> 
> here's one possible attempt at changing this, I think it's for the
> better but I'm sure there will be some disagreement.
> 
> I added some more sizes to regress that I think aren't too uncommon in
> VMs and removed some that are too small. I don't have a sparc64 to regen
> those variants.
> 
> FWIW I never use the current disklabel defaults without at least
> tweaking them a bit.

Reply via email to