var partition is too small

Redmond Militante r-militante at
Fri Oct 3 07:09:20 PDT 2003

hi all

the var partition on my apache box may be too small.
this is a problem because - 
i originally had newsyslog set at

/var/log/httpd-access.log               644  7     100  24    B /var/run/ 30

which sets httpd-access.log to be rotated in binary format everytime it reaches 100 mb or once every hour for 24 hours.
which basically means we only archive less than a day's worth of httpd-access.log's on this machine...

the /var partition on this machine is 252 mb.

yesterday i was told asked to start archiving httpd-access.logs for analysis over longer periods of time - that i should be keeping a year's worth of logs, if possible.  i remember the original reason i set up newsyslog.conf to rotate httpd-access.logs on this machine so frequently is because the webserver is really busy, and this file tends to grow pretty rapidly, and i didn't want to have to log in, stop apache, and archive the logs by hand every day...

yesterday i looked into expanding the size of my /var partition by symlinking.

-drop to single user mode
-stop syslogd
-mv /var to /usr/var
-umount /var
-delete /var directory
-create symlink from /usr/var to /var

it seems easy, and i did it successfully once, but i hosed a (non)production box yesterday practicing the above procedure.

i have a number of questions:
-if i copy the contents of /var to /usr/var, then delete the var directory, do i need to modify my fstab?

my fstab right now looks like

/dev/aacd0s1g           /usr            ufs     rw              2       2
/dev/aacd0s1e           /var            ufs     rw              2       2

-do i need to modify this so that /var now points to a directory inside /usr? and how?
-i'm thinking that this may be too risky a procedure to try on a production box (i guess i'm spooked from ruining the practice box...) - anyone think i should just archive these logs by hand to someplace in my home directory (/usr is very large on this box - 65 gb - and hardly used)?  my goal is basically to keep an archive of httpd-access.logs for as long as possible to produce a comprehensive webalizer report...

thanks again


FreeBSD 5.1-RELEASE-p5 FreeBSD 5.1-RELEASE-p5 #0: Wed Sep 24 09:12:23 CDT 2003
 8:30AM  up 1 day, 17:54, 2 users, load averages: 0.61, 0.58, 0.55
Ken Thompson has an automobile which he helped design.  Unlike most
automobiles, it has neither speedometer, nor gas gauge, nor any of the
numerous idiot lights which plague the modern driver.  Rather, if the
driver makes any mistake, a giant "?" lights up in the center of the
dashboard.  "The experienced driver", he says, "will usually know
what's wrong."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list