Help - Search - Members - Calendar
Full Version: Drive Warning /Var
The Planet Forums > System Administration > Web Hosting
philiplikens
"Drive Warning: /hda3 (/var) is 81% full"

that's the error i'm getting. any idea what i need to clear out so it's not full? for some reason i'm also having issues sending mail, so i'd imagine it's something with that... but i'm not sure. both problems hit around the same time though.

i tried to look through the forums but i didn't see anything pertaining to this. appologies if there is something and i overlooked it.

God bless,
-philip
klaude
/var typically stores log files and spool files. Check the partition out and see if there any large log files that need to be rotated. Check your mail queue for tons of messages too.
philiplikens
i checked the mail queue - there are a few in there but not enough to fill up the drive. how do i go about checking the "partition out and seeing if there are any large files that need to be rotated"? is this something i can do through whm or do i have to do something else?

thanks!
Blue|Fusion
What's the output of du -h --max-depth=1 /var and ls -lh /var?
philiplikens
16K /var/lost+found
199M /var/lib
3.6M /var/tmp
5.2G /var/log
1.8M /var/cache
12K /var/db
4.0K /var/local
8.0K /var/lock
4.0K /var/nis
4.0K /var/opt
4.0K /var/preserve
168K /var/run
241M /var/spool
28K /var/yp
4.0K /var/account
20K /var/crash
12K /var/empty
1.9M /var/www
33M /var/mailman
296K /var/named
2.9M /var/ftp
4.0K /var/tux
52M /var/cpanel
4.0K /var/portsentry
5.7G /var
du: `and': No such file or directory
du: `ls': No such file or directory
16K /var/lost+found
199M /var/lib
3.6M /var/tmp
5.2G /var/log
1.8M /var/cache
12K /var/db
4.0K /var/local
8.0K /var/lock
4.0K /var/nis
4.0K /var/opt
4.0K /var/preserve
168K /var/run
241M /var/spool
28K /var/yp
4.0K /var/account
20K /var/crash
12K /var/empty
1.9M /var/www
33M /var/mailman
296K /var/named
2.9M /var/ftp
4.0K /var/tux
52M /var/cpanel
4.0K /var/portsentry
5.7G /var
eddy2099
Here is your smoking gun

QUOTE
5.2G /var/log


It appears that your log files have grown too big. It should be safe to delete them.
TheUniverses
You should verify that log rotate is working...
philiplikens
thanks for the info! if i delete my log files, will i lose my stats files?

and how do i verify that log rotate is working?

thanks!
philiplikens
hey, sorry. i know it's annoying when people bump their posts... but i just wanna make sure i don't mess things up. does anyone know if i delete that log file if i'll erase all the stats? and how do i actually delete the log file? and turn on log rotate?
klaude
That depends on what you're using for stat generation. Most web stat programs keep their own records, and its ok to rotate logs and not disturb your old stat data. What stat program are you using?
philiplikens
AwStats Stats, but other ones too... thanks for any light you can shed icon_smile.gif
thedude
You should be ok.


You should at least be able to go in there and delete logs that are really old...like if you keep data stats for say a couple weeks, delete logs that are older than 2 weeks from today etc.
Allan87
My /var/lib is using up 5.2GB, what can I safely remove from this directory?
thedude
Well..../var/lib is a little different.

You need to know exactly what it is your deleting before you delete as on quite a few systems /var/lib contains the DB files for MySQL.

Run

du -h --max-depth=1 /var/lib

Post the results here....there might be some stuff in there that can be cleaned out...maybe.

Are you getting a warning that your running out of space, or you just decided to check space and see whats being used?
Allan87
An 80% warning, its at 81%.

12K /var/lib/ntp
29M /var/lib/Pegasus
44K /var/lib/alternatives
8.0K /var/lib/dhcp
28K /var/lib/nfs
8.0K /var/lib/php
5.8M /var/lib/munin
8.0K /var/lib/cs
8.0K /var/lib/games
46M /var/lib/pgsql
4.0K /var/lib/dav
16K /var/lib/misc
8.0K /var/lib/pcmcia
8.0K /var/lib/ibmasm
243M /var/lib/slocate
8.0K /var/lib/dhcpv6
8.0K /var/lib/up2date
4.8G /var/lib/mysql_old
42M /var/lib/rpm
5.2G /var/lib
thedude
looks like /var/lib/mysql_old is the culprit.

However, I don't see a /var/lib/mysql...I do see postgresse SQL though.

Do you use MySQL or just PGSQL?

Do you use any of the databases in the /var/lib/mysql_old folder?
Allan87
MySQL is on a seperate drive. If I keep cpanel backups anyway can I remove the ones in the mysql_old folder?
thedude
If MySQL is on a different drive than what /var/lib is on, then most likely yes, you can remove the ones in the mysql_old folder, as it looks like that was a folder created as a backup perhaps when your mysql was moved to another drive.

Just to be safe though, don't delete them yet. Instead move them somewhere else...to another folder or drive just so that they are no longer in /var/lib/mysql_old

If everything is still working fine after that is moved, then you can safely remove them.

That way though, just in case they are somehow still being used, you can just copy them back to /var/lib if something broke after you moved them.

you could also do a ls -l in the /var/lib/mysql_old folder and we could see when the last time was that they were accessed / edited.
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.