# resizing myusr partition to make space for /var



## mista_tongz (May 19, 2009)

Hi,

I am running out of space on my /var and would to find out if its possible to resize my /usr partition as it has plenty of space. Below is a printout of my partitions :

df -h

```
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a    496M     36M    420M     8%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad4s1e    496M    242K    456M     0%    /tmp
/dev/ad4s1f     69G    1.2G     62G     2%    /usr
/dev/ad4s1d    1.4G    1.2G     88M    93%    /var
```

regards


Tongai


----------



## graudeejs (May 19, 2009)

Try forums search feature, and you'll find answer


----------



## mista_tongz (May 19, 2009)

will do thanks.


----------



## graudeejs (May 19, 2009)

btw, answer lies few thread under this one


----------



## mista_tongz (May 20, 2009)

Thanks. I am having a look at it now.


----------



## DutchDaemon (May 20, 2009)

As an alternative, you could move the big directories on /var to /usr and simply symlink to them from /var. Be sure to stop processes writing to those directories first (e.g. syslogd when moving /var/log, or mysql et al. when moving /var/db).


----------



## mista_tongz (May 21, 2009)

Thanks DutchDaemon, will look at that option too.


----------



## ngowri (Feb 9, 2010)

DutchDaemon said:
			
		

> As an alternative, you could move the big directories on /var to /usr and simply symlink to them from /var. Be sure to stop processes writing to those directories first (e.g. syslogd when moving /var/log, or mysql et al. when moving /var/db).



That's a wonderful suggestion. I knew that ln and mv. but, it did not strike me, when i needed it most. Now, my /var is about 1%  and my /usr has the /var/db/mysql )  

Thanks a ton, DutchDaemon...!!


----------



## dave (Oct 7, 2010)

For future reference, when building a new machine, you may wish to use...


```
mysql_dbdir="/usr/local/mysql"
```

...in your /etc/rc.conf file in order to avoid use of /var for mysql databases in the first place.


----------

