On 2019-11-17, Lev Lazinskiy <[email protected]> wrote:
> Hi folks, 
>
> I am new to openBSD, so forgive me if I am missing something obvious. 
>
> I recently installed openBSD on a server using the auto-partition layout
> during installation and am quickly starting to run out of disk space. 
>
> I have read the section in the FAQ [1] regarding how to grow a disk
> partition, but I am confused on the best way to actually do this. 
>
> Specifically, I am trying to grow /usr and /home but they are "busy"
> when I try to follow these steps on a running server. 
>
> Is the assumption that you are supposed to reboot the server with the 
> ISO attached and pop into a shell to complete these steps?
>
> [1] https://www.openbsd.org/faq/faq14.html#GrowPartition
>

This faq entry tells you to use growfs, which won't work for /usr
from a standard auto-defaults install because it requires empty space
immediately following the partition to grow into.

On a larger disk it often will work for /home because auto-defaults
place it at the end of the disk, size it at max 300G, and leave the space
following it empty.

Sometimes you can shunt things around - if you have free space at the end
of the disk you can move files from the filesystem immediately following
/usr there, and growfs into the now-vacated space - sometimes you have
another partition that is A) larger than /usr and B) that is larger than
you need, in which case you copy files so you can swap them around.
Or again if you have free space at the end of the disk, after what you'd
want to grow /home into, you can make a new partition there, copy the
files, and leave the former /usr partition empty. But it's quite delicate
work and is often easier to reinstall.

Interested what you are bumping into on /usr, on a recently installed
system the default size is usually ok for most uses unless it's a small
disk or unless you are building ports and don't have a separate /usr/ports
partition. (If you *are* using ports and have free space at the end -
as above - you could create a new partition to hold /usr/ports in there
and move *those* files across - that's a much easier proposition than
moving the whole of /usr.



Reply via email to