# rootfs0 is full, running out of space



## Pluribootent (Jul 22, 2010)

hi!
I just finished a fresh install of freebsd 8.0 and gnome and wanted to add some other programs and got the message my system is running out of space:

```
$ df -h
Filesystem                Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs0        496M    494M    -38M   108%    /
devfs                     1.0K    1.0K      0B   100%    /dev
/dev/label/var0           989M    226M    685M    25%    /var
/dev/label/usr0            34G    5.7G     25G    18%    /usr
procfs                    4.0K    4.0K      0B   100%    /proc
linprocfs                 4.0K    4.0K      0B   100%    /usr/compat/linux/proc
```
rootfs0 is full.
there are 25GB free in usr0.
I gave the whole system about 45GB. 
What can I do?
Should I give the system more space? But that would mean a new install?
I already did this:
	
	



```
# mv -f /home /usr/home
# ln -s /usr/home /home
```
because I am not using a seperate /home partition.


----------



## jem (Jul 22, 2010)

The kernel and its modules take up about 250MB, and you may find you have two copies of it, in /boot/kernel (the live kernel) and /boot/GENERIC (a backup copy of the default kernel).

It's good practice to keep the GENERIC copy as a failsafe in case you try to customise your kernel and mess it up.  If you intend to leave your kernel unmodified, you can probably delete /boot/GENERIC to free up about 250MB of space.

Really though, you should give your root filesystem at least 1GB in future, or switch to ZFS in which case such filesystem size constraints mostly disappear (the whole capacity of the pool is available to every filesystem).


I notice also that you don't have a seperate /tmp filesystem.  I personally have never seen /tmp get very large, but its possible and could cause low free space in your root filesystem too.  You might consider setting up tmpmfs or tmpfs.


----------



## Pluribootent (Jul 22, 2010)

thanks for your answer!

How would I change the size of rootfs? using the install-cd and then repartition? Or is it better to start from scratch again? I am new to BSD, all a little tricky at the moment. I tried using gparted which I am familiar with coming from gentoo, but gparted cant handle ufs.

Greetings.


----------



## jem (Jul 22, 2010)

If you've not done much with your system yet, I'd recommend reinstalling from scratch.

I've built my boxes with the following partition sizes in the past:


```
ad0s1a  /       1GB
ad0s1b  swap    2x physical memory
ad0s1d  /var    1GB, but more if the main purpose of the system demands it, for example a mail server
ad0s1e  /usr    10GB, but more if you intend to install many ports/packages
ad0s1f  /home   Remainder of disk
```

Use tmpmfs or tmpfs for /tmp, if you have plenty of RAM.

Bear in mind that opinions on suitable filesystem sizes will vary a lot, so these are just guidelines.


----------



## Pluribootent (Jul 22, 2010)

thank you for sharing!
I'll start a fresh install tomorrow.


----------



## fronclynne (Jul 23, 2010)

Just to chime in, here's what my laptop looks like now: 
	
	



```
> df -h
Filesystem         Size    Used   Avail Capacity  Mounted on
/dev/ufs/rootfs    1.9G     67M    1.7G     4%    /
devfs              1.0K    1.0K      0B   100%    /dev
/dev/ufs/homefs    371G     56G    285G    16%    /home
/dev/ufs/usrfs      19G    4.8G     13G    27%    /usr
/dev/ufs/varfs     1.9G     84M    1.7G     5%    /var
tmpfs              448M     12K    448M     0%    /tmp
procfs             4.0K    4.0K      0B   100%    /proc
linprocfs          4.0K    4.0K      0B   100%    /usr/compat/linux/proc
linsysfs           4.0K    4.0K      0B   100%    /usr/compat/linux/sys
```

/ & /var/ are probably seriously overallocated, but I'm looking at the future when we're all running 16384-bit intel corn-doodle i99 pentimumbles, or whatever stupid name those sausage-stuffers come up with next.


----------

