Help - Search - Members - Calendar
Full Version: Var partition running out of space
The Planet Forums > System Administration > Server Hardware > RaQ Support
dragonhawk
Got a little problem with my RaQ partitions

When I run df -k, I get this:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 743466 690508 52958 93% /
/dev/hda3 198601 191562 7039 96% /var
/dev/hda4 17671528 12709153 4962375 72% /home

When the /var partition runs out of space, httpd dies and so does email. Is it possible to increase the space allocated to /var? Can I move some space from /home to /var? If so, how would I go about doing it?

Many thanks in advance icon_smile.gif
Joe-Ev1Servers
Hello dragonhawk,

It sounds like you're having the same issue that we've seen on a lot of the Cobalt RaQ's that get a moderate amount of traffic, and that is that the logs get large, and fill up /var. The problem with resizing partitions is that the results can be unpredictable, and sometimes irrecoverable.

What has worked for me in the past is to move the logs directory over to the /home partition, and create a symbolic link from /var/log to /home/log.

Another thing that can fill up the /var partition is email, which is stored in /var/spool/mail, but I believe that there was a Cobalt patch that moved it over to /home/spool/mail, and created symbolic links for each individual mailbox.

Hope this helps!
- Joe
dragonhawk
Would you happen to know where I can get that patch from for the mail?
Joe-Ev1Servers
Come to think of it, I think that the RaQ4 simply does that by default. You can check by doing:

ls -lah /var/spool/mail

You should see that everything in that directory is actually a symbolic link, or possibly that the /var/spool/mail directory itself is a sym link to /home/spool/mail.

The Cobalt patches are available from the Sun website, here:

http://sunsolve.sun.com/pub-cgi/show.pl?ta...g&nav=patchpage

Quoth the Cobalt site: "Downloads MUST be applied from the bottom of the page to the top, as they must be applied in chronlogical order. Application of these patches in improper order will likely result in problems with the Sun Cobalt™ product."

So you'll want to be careful with those patches.

Someone else on the forum may have a better method for doing this, but you can track down where the most space is being used by going into the /var directory and using the du command like this:

du -h --max-depth=1

Watch for the biggest directory, cd into it, and run the same command again. Repeat until you've found the culprit.

Hope this helps,
- Joe
dragonhawk
The biggest ones are:
[php]
1 ./lib/rpm
1 ./lib/games
1 ./lib/nfs/sm
1 ./lib/nfs/sm.bak
4 ./lib/nfs
1 ./lib/ldap
1241 ./lib/slocate
47 ./lib/cobalt/uninstallers
26 ./lib/cobalt/obsolete
109 ./lib/cobalt
1 ./lib/pgsql/backups
1402 ./lib/pgsql/data/base/template1
166305 ./lib/pgsql/data/base/cobalt
167708 ./lib/pgsql/data/base
1 ./lib/pgsql/data/pg_xlog
167810 ./lib/pgsql/data
167813 ./lib/pgsql
1078 ./lib/analog/lang
1079 ./lib/analog
170257 ./lib
[/php]
There's more too, but the ./lib takes up the majority of the space and that seems to be growing every day. Is there anything there that I don't need and can remove?
MarshallGuru
I've been getting e-mails left and right about the var/ partion out of space. i did some reaserch and this is what I found.

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 743466 626077 117389 85% /
/dev/hda3 198601 196935 1666 100% /var
/dev/hda4 36071303 19545767 16525536 55% /home

I know this isn't good from reading the other posts. How can i fix this?

Also, when I looked in the /var/spool/mail folder I fould this with all the other accounts. Can I delete this? If so... how do I do so?

-rw------- 1 httpd httpd 126M Jan 18 21:08 httpd
FEDE
cd /var/spool/mail
rm httpd

icon_smile.gif icon_smile.gif icon_smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.