Account Questions

CPanel Drive Warning: /dev/sda3 (/var) is 88% full !!!

More research:

df -h

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             2.0G  242M  1.7G  13% /
/dev/sda1              99M   12M   83M  12% /boot
none                  504M     0  504M   0% /dev/shm
/dev/sda8             130G  6.0G  118G   5% /home
/dev/sda7             494M   11M  458M   3% /tmp
/dev/sda2             9.9G  4.0G  5.4G  43% /usr
/dev/sda3             2.5G  1.9G  424M  82% /var
/tmp                  494M   11M  458M   3% /var/tmp

du -h –max-depth=1 /var

Code:
8.0K    /var/local
76M     /var/spool
192K    /var/named
772K    /var/run
16K     /var/crash
731K    /var/tmp
24K     /var/empty
8.0K    /var/preserve
161M    /var/cpanel
28K     /var/db
8.0K    /var/opt
684M    /var/lib
84K     /var/profiles
24K     /var/yp
855M    /var/cache
12K     /var/portsentry
103M    /var/log
1.2M    /var/www
8.0K    /var/nis
12K     /var/account
36K     /var/lock
16K     /var/lost+found
1.9G    /var

du -ah –max-depth=1 /var/cache

Code:
853M    /var/cache/yum
16K     /var/cache/samba
4.0K    /var/cache/mod_ssl
4.0K    /var/cache/mod_proxy
1.9M    /var/cache/man
855M    /var/cache


1st Problem is in Yum.

du -ah –max-depth=1 /var/cache/yum

Code:
568K    /var/cache/yum/extras
0       /var/cache/yum/.gpgkeyschecked.yum
266M    /var/cache/yum/update
40K     /var/cache/yum/addons
587M    /var/cache/yum/base
853M    /var/cache/yum

du -ah –max-depth=1 /var/cache/yum

Code:
561M    /var/cache/yum/base/packages
21M     /var/cache/yum/base/headers
612K    /var/cache/yum/base/primary.xml.gz
4.9M    /var/cache/yum/base/primary.xml.gz.sqlite
0       /var/cache/yum/base/cachecookie
4.0K    /var/cache/yum/base/repomd.xml
587M    /var/cache/yum/base

The problem is in /yum/packages….can I delete this ?


2nd problem

du -ah –max-depth=1 /var/lib

Code:
8.0K    /var/lib/pcmcia
4.7M    /var/lib/slocate
8.0K    /var/lib/games
12K     /var/lib/dhcp
4.0K    /var/lib/random-seed
12K     /var/lib/alternatives
8.0K    /var/lib/up2date
8.0K    /var/lib/php
23M     /var/lib/rpm
28K     /var/lib/nfs
8.0K    /var/lib/logrotate.status
8.0K    /var/lib/dhcpv6
656M    /var/lib/mysql
272K    /var/lib/spamassassin
16K     /var/lib/misc
4.0K    /var/lib/dav
4.0K    /var/lib/supportinfo
684M    /var/lib

2nd Problem is in MySQL

Remedy: I have checked the databases and will remove db’s that are no longer in use.

The most common places where space is used on var is /var/log and /var/lib/mysql and /var/spool/exim

Clear up the old logs, mail queue, and any unneeded mysql databases.

If necessary, mysql can be moved to another drive or partition.

Related articles

Was this article helpful?