From owner-freebsd-questions Thu Nov 8 19:23:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id A648F37B418 for ; Thu, 8 Nov 2001 19:23:35 -0800 (PST) Received: (qmail 37614 invoked by uid 100); 9 Nov 2001 03:23:33 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15339.19509.674871.666360@guru.mired.org> Date: Thu, 8 Nov 2001 21:23:33 -0600 To: "Scott Gerhardt" , "Ronald R. Perez" Cc: questions@freebsd.org Subject: RE: /var/ is full In-Reply-To: <39497669@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Scott Gerhardt 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 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. 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