On 07/01/17 06:15, pipfsta...@openmailbox.org wrote:
> Hello, dear misc
> 
> I want to use openbsd for daily tasks on my laptop, I'm planning to 
> build ports by hand and I want to try some development of the system 
> itself.
> 
> At the moment I'm just playing around and I faced a little problem: 
> space allocated by default partitioning to /usr ran out in a blink of an 
> eye. Current df:

And the reason is, you are doing something the default partition plan
wasn't planning on you doing -- having a /usr/ports directory full of stuff.

> $ df -h
> Filesystem     Size    Used   Avail Capacity  Mounted on
> /dev/sd0a     1005M   61.1M    893M     6%    /
> /dev/sd0k     98.8G    3.2G   90.6G     3%    /home
> /dev/sd0d      3.9G    724M    3.0G    19%    /tmp
> /dev/sd0f      2.0G    2.0G  -91.1M   105%    /usr
> /dev/sd0g     1005M    177M    778M    19%    /usr/X11R6
> /dev/sd0h      9.8G    1.0G    8.3G    11%    /usr/local
> /dev/sd0j      2.0G    850K    1.9G     0%    /usr/obj
> /dev/sd0i      2.0G    861M    1.0G    45%    /usr/src
> /dev/sd0e     18.3G   12.0M   17.3G     0%    /var
> 
> I want to reinstall OpenBSD from a snapshot and pick a custom partition 
> scheme. Based on the needs described above, what partitions should I 
> keep and what sizes should I peek? I know about the workaround with the 
> /usr partition by setting a few variables (WRKOBJDIR, ...) in 
> /etc/mk.conf, but I'm not sure if it's the best solution. May be just 
> give more space for /usr/? Also, is so much space for /var really 
> needed? It empty at the moment, will daily desktop usage/little OpenBSD 
> development fill it up?
>
> Also, I'm confused with such a small amount of space for /. Is 1G 
> enough?

First of all, all Ingo's suggestions are right on.  But I'm going to do
something I rarely do: give a short answer. :)

You don't even have to reload.  Save your existing /home partition, and
shrink it to maybe 20g, then restore it.  Now you have lots of space to
create a new /usr/ports, or whatever else you may need in the future.

As for root being "only" 1G, actually, I'd call that kinda big.  I've
run systems for many years with 200MB root.  There just shouldn't be
much going there, and if there is, it usually indicates something has
gone wrong, so an early warning is nice.  (/dev is in /, so a common
error is to end up trying to write to a device, but mistyping it and
making a file there instead).

/var ... "depends".  If all you have is routine logs going there, than
1G is "big".  If you have an app that has a database or a web app,
suddenly your 18g may look small.  What are you developing?  Web apps?
/var (holding /var/www) will suddenly be small.

Guess I lied about the short answer... :-/

Nick.

Reply via email to