# No more free space on /usr



## horus33 (Feb 8, 2012)

Hello,
I have FreeBSD 9.0-RELEASE installed and configured. Now I wanted to fetch ports collection to /usr but I found a problem. Although I put /usr on separate partition and gave it 1G of space it is almost full now (only 79MB free). 

p.s. I noticed that following directory in /usr is taking a lot of space:
/usr/local (633MB) with (316MB) occupied by /usr/local/share and (261MB) occupied by /usr/local/lib

Is this normal?


----------



## fluca1978 (Feb 8, 2012)

This is a system of mine, running 8.2-RELEASE:


```
# du -hs /usr/local/*
 20M    /usr/local/bin
148K    /usr/local/etc
8.9M    /usr/local/include
 17M    /usr/local/info
 89M    /usr/local/lib
 40K    /usr/local/libdata
110K    /usr/local/libexec
4.9M    /usr/local/man
 66K    /usr/local/pgsql
776K    /usr/local/sbin
426M    /usr/local/share
2.0K    /usr/local/www
```


By the way you can always mount /usr/ports from another partition/disk (if you have any) or reconfigure the ports tree to work into another place (see here).


----------



## SPlissken (Feb 8, 2012)

Well, unfortunatly you should have given 10 GB to /usr.

Several solutions:
- Reinstall
- Move some folders elsewere and link it, *I* did it for ports folder on my previous laptop
- Use growfs, never used it.

If *I* were you *I* would reinstall it with new partition sizes.


----------



## SirDice (Feb 8, 2012)

horus33 said:
			
		

> Although I put /usr on separate partition and gave it 1G of space it is almost full now (only 79MB free).


1GB is certainly not enough. 



> p.s. I noticed that following directory in /usr is taking a lot of space:
> /usr/local (633MB) with (316MB) occupied by /usr/local/share and (261MB) occupied by /usr/local/lib


All ports install in /usr/local/. Depending on how many ports and which ones you'll use quite a lot more.



> Is this normal?


Yes.


```
dice@molly:~>df -h
Filesystem                          Size    Used   Avail Capacity  Mounted on
/dev/ada4s1a                        989M    380M    529M    42%    /
devfs                               1.0k    1.0k      0B   100%    /dev
tmpfs                               5.8G    224k    5.8G     0%    /tmp
procfs                              4.0k    4.0k      0B   100%    /proc
/dev/ada4s1d                          2G    206M    1.6G    11%    /var
[b]/dev/ada4s1e                        8.7G    4.4G    3.6G    55%    /usr[/b]
/dev/ada4s2d                         24G     69M     22G     0%    /usr/home
linprocfs                           4.0k    4.0k      0B   100%    /usr/compat/linux/proc
tank/FreeBSD/jails                  1.3T     54k    1.3T     0%    /jails
tank/FreeBSD/jails/j1               1.3T    922M    1.3T     0%    /jails/j1
tank/FreeBSD/jails/j2               1.3T    1.7G    1.3T     0%    /jails/j2
tank/FreeBSD/jails/j2/mysql         1.3T     79M    1.3T     0%    /jails/j2/var/db/mysql
storage                             2.3T    174k    2.3T     0%    /storage
storage/media                       5.2T    2.9T    2.3T    56%    /storage/media
tank/FreeBSD/tinderbox              1.3T    2.9G    1.3T     0%    /usr/local/tinderbox
tank/FreeBSD/ports                  1.3T    361M    1.3T     0%    /usr/ports
tank/FreeBSD/ports/distfiles        1.3T      9G    1.3T     1%    /usr/ports/distfiles
tank/FreeBSD/ports/packages         1.3T    2.2G    1.3T     0%    /usr/ports/packages
tank/FreeBSD/src                    1.3T    730M    1.3T     0%    /usr/src
tmpfs                               5.8G    4.0k    5.8G     0%    /jails/j1/tmp
/usr/ports                          1.3T    361M    1.3T     0%    /jails/j1/usr/ports
/usr/ports/distfiles                1.3T      9G    1.3T     1%    /jails/j1/usr/ports/distfiles
/usr/ports/packages                 1.3T    2.2G    1.3T     0%    /jails/j1/usr/ports/packages
devfs                               1.0k    1.0k      0B   100%    /jails/j1/dev
tmpfs                               5.8G    4.0k    5.8G     0%    /jails/j2/tmp
devfs                               1.0k    1.0k      0B   100%    /jails/j2/dev
tank/FreeBSD/jails/clean_jail       1.3T    679M    1.3T     0%    /jails/clean_jail
tank/FreeBSD/jails/j-build-amd64    1.3T    7.2G    1.3T     1%    /jails/j-build-amd64
tmpfs                               5.8G     12k    5.8G     0%    /jails/j-build-amd64/tmp
/usr/src                            1.3T    730M    1.3T     0%    /jails/j-build-amd64/usr/src
/usr/ports                          1.3T    361M    1.3T     0%    /jails/j-build-amd64/usr/ports
/usr/ports/distfiles                1.3T      9G    1.3T     1%    /jails/j-build-amd64/usr/ports/distfiles
/usr/ports/packages                 1.3T    2.2G    1.3T     0%    /jails/j-build-amd64/usr/ports/packages
devfs                               1.0k    1.0k      0B   100%    /jails/j-build-amd64/dev
procfs                              4.0k    4.0k      0B   100%    /jails/j-build-amd64/proc
```

Note that I have split off /usr/home/, /usr/ports/, /usr/src/ and /usr/obj/.


----------

