Date: Thu, 8 Nov 2001 21:23:33 -0600 From: Mike Meyer <mwm@mired.org> To: "Scott Gerhardt" <scott@gerhardt-it.com>, "Ronald R. Perez" <ronaldp76@earthlink.net> Cc: questions@freebsd.org Subject: RE: /var/ is full Message-ID: <15339.19509.674871.666360@guru.mired.org> In-Reply-To: <39497669@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Scott Gerhardt <scott@gerhardt-it.com> types: > Yes, the default /var is grossly undersized and can result in suprises for > newbies that don't realize how large the logs and mail spool can get on a > busy server, especially when virtual hosting. I think the default location > for data i.e. MySQL databases is in /var/db as well, so database > requirements should be considered. These are things that are not obvious to > the new FreeBSD'er. > > In my installation, I made a 2GB /var/log partition just for logs. That way > if logging get's out of control the mail spool and other processes that rely > on /var are not affected. I also made /var quite large (6GB) to handle > databases and mail spool. Of course every installation will be different > depending upon the purpose of the Server. My installations either have large /var's, or large /'s without mounting a separate /var, depending on whether or not / and /var are being treated differently for some purposes. Ronald R. Perez <ronaldp76@earthlink.net> types: > The same thing is happening to my machine. How do we go about in resizing > the /var partition? The size of my /var partition is 20MB. The easiest way to do this is shut down to single user mode, choose a partition with a reasonable amount of free space - probably either /usr or /home, and create a var on it - say /home/var. Now dump /var and restore it in the new location like so: # dump 0af - /var | (cd /home/var; restore xf -) Now point /var to the new location like so: # unmount /var # rmdir /var # ln -s /home/var / Finally, remove the /var line from /etc/fstab. That solves the problem, but wastes 20 MB of disk space. If that really bothers you, you can expand the partition in front of /var to use it. If that's swap, just changing the partition size with disklabel will do the trick. If it's a real file system, you'll want to use growfs afterwards. Personally, I don't think 20 meg is worth the trouble. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15339.19509.674871.666360>