# what is taking up all the space on / ?



## crazychip (Jul 20, 2012)

Hi. One of my servers stopped responding today, and a quick look reveled that it had ran out of space. Earlier I had done some experimenting with memory disks and had a quite large disk.img file filling up in /root. I rebooted and deleted the .img file. However there seems to be something else filling up /. 

```
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad1s1a    989M    883M     26M    97%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad1s1e    989M    306k    909M     0%    /tmp
/dev/ad1s1f     25G    6.4G     16G    28%    /usr
/dev/ad1s1d    5.6G    914M    4.2G    17%    /var
```
How can I best go about determining what is taking up so much space?


----------



## graudeejs (Jul 20, 2012)

you can try 
	
	



```
# hu -hd0 /*
```


----------



## crazychip (Jul 20, 2012)

I don't seam to have the `# hu` command


----------



## graudeejs (Jul 20, 2012)

crazychip said:
			
		

> I don't seam to have the `# hu` command



Error. I mean 
	
	



```
# du -hd0 /*
```


----------



## fluca1978 (Jul 20, 2012)

I usually do a 

```
du -hs /*
```

that is simpler for me to remember. Based on my experience usually these things happen due to a removable media mount failed (so that the data is written on local hard disk instead of the media) or jails configured in the root partition.


----------



## SirDice (Jul 20, 2012)

You may also have a lot of kernel .symbols files taking up space. If you don't need them you can remove them.

`# find /boot -name '*.symbols' -delete`


----------



## crazychip (Jul 20, 2012)

Yeah it seemed that the /boot/kernel and kernel.OLD was taking up lots of space.
I am in the middle of "rebuilding the world" so I will recheck the space usage afterwards and try your tip SirDice.

However I don't know what a kernel .symbols file is so would it then me safe to say that I don't really need them?


----------



## SirDice (Jul 20, 2012)

crazychip said:
			
		

> However I don't know what a kernel .symbols file is so would it then me safe to say that I don't really need them?


They're mainly used when debugging the kernel. If you don't know what they are, you don't need them


----------



## crazychip (Jul 20, 2012)

That did the trick SirDice. 

```
root at valhall# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad1s1a    989M    828M     81M    91%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad1s1e    989M    402k    909M     0%    /tmp
/dev/ad1s1f     25G    6.5G     16G    28%    /usr
/dev/ad1s1d    5.6G    905M    4.2G    17%    /var
root at valhall# find /boot -name '*.symbols' -delete
root at valhall# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad1s1a    989M    295M    614M    32%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad1s1e    989M    402k    909M     0%    /tmp
/dev/ad1s1f     25G    6.5G     16G    28%    /usr
/dev/ad1s1d    5.6G    905M    4.2G    17%    /var
```


----------



## fluca1978 (Jul 20, 2012)

Also enabling periodic 100-clean-disks could help avoiding such problems (in a range of days of course).


----------



## crazychip (Jul 23, 2012)

Hi again.
I made a /etc/periodic.conf and added the following code.

```
# 100.clean-disks
daily_clean_disks_enable="YES"               # Delete files daily
daily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]* *.symbols"
daily_clean_disks_days=3                # If older than this
daily_clean_disks_verbose="YES"             # Mention files deleted
```
It's a copy/paste from the default periodic file with the addition of *.symbols on the end third line.
Just want to know if I am doing this right. It's the first time I have modified the periodic.


----------

