Hi, pipfsta...@openmailbox.org wrote on Sat, Jul 01, 2017 at 10:15:19AM +0000:
> 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: > > $ 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 If you want to do base system development including building different kernels and building releases, you might run out of space here, too. I'm currently using: /dev/sd0d 3.9G 2.1G 1.6G 57% /usr/obj > /dev/sd0i 2.0G 861M 1.0G 45% /usr/src > /dev/sd0e 18.3G 12.0M 17.3G 0% /var You did not mention whether you want to work on Xenocara, too. If so, here is what i am using: /dev/sd0k 2.0G 855M 1.0G 45% /usr/xenocara /dev/sd0l 2.0G 2.0K 1.9G 0% /usr/xobj Even if you don't want to work on Xenocara right now, i'd recommend to leave at least 4 GB unallocated in case you change your mind later - or even better, much more than 4 GB, because other needs you didn't think of in time might come up later. > 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 All of them. > and what sizes should I peek? None of them except making /usr/obj/ larger. > 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. It is not. Setting up additional partitions for your needs is much more robust and less error-prone. > May be just give more space for /usr/? No, you really don't want /usr/bin/ and /usr/ports/pobj/ to reside on the same file system. For occasional, mild work on ports, here is what i am using: /dev/sd0m 5.9G 4.8G 794M 86% /usr/ports /dev/sd0n 19.7G 17.2G 1.5G 92% /usr/ports/pobj I cleaned out /usr/ports/pobj/ recently, by the way, deleting more than 10G. You see, in sharp contrast to most other partitions, /usr/ports/ and /usr/ports/pobj/ always tend to fill up. Ports are pigs. If you want to work on stuff like KDE, Gnome, or LibreOffice, the above partition sizes would be completely inadequate. For most other partitions, simply allocating the maximum that reasonable use might require is often a good solution, even if you don't plan to do the related work just yet. Not so for ports. Allocating ports partitions that feel comfortable for full bulk builds on a notebook might consume more space than you want to afford. So it really depends on what it is that you want to build in ports land, and how many build directories of large ports you need to keep around at the same time... If you feel completely at a loss now, i'd recommend to start with about 8 plus 40 GB and leave many hundred GB unallocated, such that you can allocate a much larger /usr/ports/pobj/ when needed. And then see for yourself how much *you* need in practice. That may be more or less than *I* need. > Also, is so much space for /var really needed? It empty at the > moment, will daily desktop usage/little OpenBSD development fill > it up? It depends on what you are doing. Keep in mind that OpenBSD is a general-purpose system, so the default install is also supposed to be adequate for Internet servers unless they have special needs. On a laptop, you may get away with much less space for /var/, maybe with as little as a few 100M, but in general, i don't recommend tuning the defaults *down*. Even on a laptop, at some point, you may want to test httpd(8), put some data into /var/www/, and -- oops... Or other things you don't anticipate right now. Also, /var/ is the place where running out of space is *least* funny. If that happens to you, system logging comes to a grinding halt, email may no longer arrive, pkg_add(1), sysmerge(8), syspatch(8) go out of commission, and so on and so forth, which doesn't exactly help to get the system back into working order. > Also, I'm confused with such a small amount of space for /. > Is 1G enough? Absolutely. I contains a HUGE safety margin. I have often run machines with HALF a GB at / or even less and don't remember problems with that - but nowadays, thinking about units less than a GB is really not very useful. Here is what i currently have: /dev/sd0a 1005M 206M 749M 22% / Yours, Ingo