Drive Warning: /dev/sda3 (/usr) is 86% full - please help

ns1

Active Member
Aug 8, 2006
31
0
156
I have just started new server and after less than a month i got this error message:
Drive Warning: /dev/sda3 (/usr) is 86% full

So I checked and i can see that Cpanel is using 3Gb! is that normal?
What else can I delete?
The partition has 7.8Gb, and is using 6.4 at the moment and it is rising...

Code:
[email protected] [/usr/local]# cd ..
[email protected] [/usr]# du -h --max-depth=1
27M     ./include
116K    ./man
595M    ./lib
76K     ./doc
88M     ./src
8.0K    ./games
1.6M    ./kerberos
46M     ./sbin
12K     ./etc
255M    ./bin
24K     ./X11R6
4.5G    ./local
884M    ./share
21M     ./libexec
16K     ./lost+found
6.3G    .
[email protected] [/usr]# cd local
[email protected] [/usr/local]# du -h --max-depth=1
2.8M    ./include
28K     ./man
33M     ./frontpage
15M     ./Zend
4.2M    ./lib
64K     ./les
3.0G    ./cpanel
360K    ./sim
6.0M    ./src
8.0K    ./games
66M     ./apache.backup_archive
108K    ./bandmin
1.7M    ./cpanel-rollback
35M     ./apache.backup
24K     ./sbin
12K     ./etc
15M     ./bin
40K     ./spri
152K    ./bfd
2.0M    ./IonCube
344K    ./share
8.0K    ./libexec
332M    ./apache
1005M   ./BUAgent
4.5G    .
 

rs-freddo

Well-Known Member
May 13, 2003
834
1
168
Australia
cPanel Access Level
Root Administrator
you'll find that you can delete some cpanel rollback files and some apache logs. Search the forum, i had to delete some files the other day.
 

Kailash1

Well-Known Member
Nov 27, 2006
255
2
168
cPanel Access Level
Root Administrator
Twitter
It seems that you have many clients using mailing list check the disk usage of the following folder:

/usr/local/cpanel/3rdparty/mailman

It is used to store mailing lists. You can move this to another partition and create a symlink to point to new location.

Kailash
 

ns1

Active Member
Aug 8, 2006
31
0
156
I've checked
/usr/local/cpanel/3rdparty/mailman

and this is the usage of the directory
HTML:
[email protected] [/usr/local/cpanel/3rdparty/mailman]# du -h --max-depth=1
784K    ./tests
180K    ./cgi-bin
4.0K    ./locks
68K     ./scripts
28K     ./icons
40K     ./archives
80K     ./cron
28K     ./logs
4.2M    ./pythonlib
40K     ./lists
4.0K    ./spam
2.8M    ./Mailman
40K     ./qfiles
24K     ./data
336K    ./bin
4.0K    ./suspended.lists
6.5M    ./templates
24K     ./mail
24M     ./messages
39M     .
I don't think that there is the problem...

however, when I check cpanel directory
HTML:
[email protected] [/usr/local/cpanel]# du -h --max-depth=1
16K     ./sqloptimizer
20K     ./tests
968K    ./Whostmgr
36K     ./htdocs
5.8M    ./Cpanel
2.0M    ./lang
44K     ./cpupdatepatches
28K     ./cpaddons
44K     ./vsrvmgr
32K     ./img-sys
72K     ./hooks
4.0K    ./modules-install
174M    ./3rdparty
2.1G    ./whostmgr
13M     ./perl
6.1M    ./logs
6.5M    ./lib
260K    ./install
88K     ./sys_cpanel
7.0M    ./cgi-sys
2.7M    ./build-tools
283M    ./src
20K     ./redhat
96K     ./spamassassin_sandbox
36K     ./var
204M    ./base
6.7M    ./java-sys
148K    ./obj
3.0M    ./etc
172M    ./bin
28K     ./php
104K    ./share
48K     ./libexec
40K     ./apache
4.0K    ./mail
48K     ./entropychat
16K     ./docs
12K     ./ea2-tools
3.0G    .
so I followed this and got to "fantastico" folder which uses up 1.9Gb. I have recently installed it, so it makes sense...in it I found a lot of .tgz's for many applications. I presume I cannot delete those .tgz's if I want users to use those applications.

If I want to move fantastico to /home directory can I do it, and how do I create symlink for it? I have not done symlink before so I would appreciate the help.
 

ns1

Active Member
Aug 8, 2006
31
0
156
Well I think I have solved. I searched a little and seem to have figured symlink, it's not difficult at all for usage like this.

I have moved fantastico folder to /home and created symlink:
ln -s /home/fantastico /usr/local/cpanel/whostmgr/docroot/cgi/fantastico

Then I went into WHM and Cpanel of a user to see if Fantastico works in all of them and so far so good...

I appreciate all the help! Thank you!:)
 

ns1

Active Member
Aug 8, 2006
31
0
156
I have automatically rejected the possibility of logs since it's new server and i doubt that it could have accumulated more than few gigas of logs...

but it will be a good reminder for someone else (me?)
 

laluvirtual

Member
Aug 31, 2006
24
0
151
i also face this problem look at this:
Code:
[[email protected] usr]# du -h --max-depth=1
122M    ./src
1001M   ./lib
1.7G    ./share
330M    ./bin
76K     ./doc
1.9G    ./local
124K    ./man
147M    ./include
12K     ./etc
24K     ./X11R6
172K    ./kerberos
47M     ./libexec
8.0K    ./games
16K     ./lost+found
25M     ./sbin
5.2G    .
[[email protected] usr]#

[[email protected] local]# du -h --max-depth=1
166M    ./jdk1.6.0_02
8.0K    ./src
5.1M    ./lib
180K    ./share
108K    ./bandmin
9.2M    ./tt2
18M     ./bin
13M     ./apache.backup_archive
28K     ./man
3.2M    ./include
12K     ./etc
75M     ./apache
42M     ./jakarta
273M    ./cpanel-rollback
42M     ./apache.backup
1.2G    ./cpanel
8.0K    ./libexec
15M     ./Zend
2.0M    ./IonCube
31M     ./frontpage
8.0K    ./games
24K     ./sbin
1.9G    .
i already delete domlogs and error log files but its not work.
what file should i delete and safe for my system?

Thank you for your help
 

InstaCarma_Tech

Well-Known Member
Apr 22, 2009
227
1
68
Some tips for clearing out some space in /usr partition

1. Restart the httpd service. This might free a little space some times.

2. Check for apache logs like error_log, access_log , suexec_log in /usr/local/apache/logs . These can either be cleared off or if you need the logs then you can take a zipped copy and keep it aside.

3. Same can be done for the files in cPanel logs (/usr/local/cpanel/logs) as well .

4. Domlogs – Get into the /usr/local/apache/domlogs/ directory. Run the following command :-

# ls -al -SR | head -10 —> It will list 10 files in the decreasing order according to their size

If the domlog file is too large for a domain then it is possible that awstats is not running . Check whether cpanellogd is running on the server using pstree . If not, restart it .
Else, it is possible that awstats for only that particular domain is not updating. Get into the directory /usr/local/cpanel/base and check if any file as ‘awstats.domainname.com.conf’ exists. If yes , delete that file.

Now, run /scripts/runweblogs for that user. It will update the awstats and automatically clear the domlogs file thereafter. Do not delete the domlogs file itself.

5. Remove old and unwanted backups of ‘apache’ that might have been taken long ago. Also, check for any other duplicate folders that can be removed safely.

6. Remove core files, if any . Normally, some core files (like core.1234) might be present in /usr/local/cpanel/whostmgr/docroot . Check for these and remove them.
 

Kevinfrom

Well-Known Member
Jan 18, 2008
47
1
56
What size is your /usr partition?

df -h

It is recommended to create a /boot, /tmp partitions then balance on /

Appears your /usr partition is only 6GB and will continue to have problems as domlogs, apache and cPanel logs are all stored there.

cPanel can normally grow to 3GB and Apache can also grow to 3GB, these 2 alone will continue to cause disk space issues for you.
 

ns1

Active Member
Aug 8, 2006
31
0
156
What size is your /usr partition?

df -h

It is recommended to create a /boot, /tmp partitions then balance on /

Appears your /usr partition is only 6GB and will continue to have problems as domlogs, apache and cPanel logs are all stored there.

cPanel can normally grow to 3GB and Apache can also grow to 3GB, these 2 alone will continue to cause disk space issues for you.
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             7.8G  426M  7.0G   6% /
/dev/sda8             198G   58G  130G  31% /home
/dev/sda6             996M  713M  232M  76% /tmp
/dev/sda3             7.8G  6.7G  723M  91% /usr
/dev/sda2             9.7G  4.4G  4.9G  48% /var
/dev/sda1             122M   16M  100M  14% /boot
tmpfs                1014M     0 1014M   0% /dev/shm
Thank you for your reply.
I am still having problems with this.
I have noticed that Apache logs are taking a lot of space.
Code:
[email protected] [/usr/local/apache]# du -h --max-depth=1
12K     ./cgi-bin
1.7M    ./include
52K     ./htdocs
208K    ./error
96K     ./man
944K    ./icons
288K    ./build
520M    ./domlogs
2.0G    ./logs
13M     ./manual
24M     ./modules
892K    ./lib
2.7M    ./conf
404K    ./conf_pre_ea3
1.5M    ./bin
2.6G    .
[email protected] [/usr/local/apache]#
... hmmm ... while replying my partition usage decreased.

now it's like
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             7.8G  426M  7.0G   6% /
/dev/sda8             198G   58G  130G  31% /home
/dev/sda6             996M  713M  232M  76% /tmp
/dev/sda3             7.8G  5.3G  2.1G  72% /usr
/dev/sda2             9.7G  4.4G  4.9G  48% /var
/dev/sda1             122M   16M  100M  14% /boot
tmpfs                1014M     0 1014M   0% /dev/shm
Moment ago I have activated log rotation for Apache logs, could that have anything to do with it?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             7.8G  426M  7.0G   6% /
/dev/sda8             198G   58G  130G  31% /home
/dev/sda6             996M  713M  232M  76% /tmp
/dev/sda3             7.8G  6.7G  723M  91% /usr
/dev/sda2             9.7G  4.4G  4.9G  48% /var
/dev/sda1             122M   16M  100M  14% /boot
tmpfs                1014M     0 1014M   0% /dev/shm
Thank you for your reply.
I am still having problems with this.
I have noticed that Apache logs are taking a lot of space.
Code:
[email protected] [/usr/local/apache]# du -h --max-depth=1
12K     ./cgi-bin
1.7M    ./include
52K     ./htdocs
208K    ./error
96K     ./man
944K    ./icons
288K    ./build
520M    ./domlogs
2.0G    ./logs
13M     ./manual
24M     ./modules
892K    ./lib
2.7M    ./conf
404K    ./conf_pre_ea3
1.5M    ./bin
2.6G    .
[email protected] [/usr/local/apache]#
... hmmm ... while replying my partition usage decreased.

now it's like
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             7.8G  426M  7.0G   6% /
/dev/sda8             198G   58G  130G  31% /home
/dev/sda6             996M  713M  232M  76% /tmp
/dev/sda3             7.8G  5.3G  2.1G  72% /usr
/dev/sda2             9.7G  4.4G  4.9G  48% /var
/dev/sda1             122M   16M  100M  14% /boot
tmpfs                1014M     0 1014M   0% /dev/shm
Moment ago I have activated log rotation for Apache logs, could that have anything to do with it?
While ensuring proper rotation of logs will help, it will not completely solve the problem of the partition being too small. I would check with your data center and or hardware vendor about options for upgrading the storage capacity and or migrating to a new server (clean installation) that has a better, well-thought-out partitioning scheme.
 

ns1

Active Member
Aug 8, 2006
31
0
156
This server is at The Planet. How can it be that they have done this poor partitioning scheme?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
This server is at The Planet. How can it be that they have done this poor partitioning scheme?
Without explicitly telling the data center how you would like the system partitioned you may end up with a default setup that may or may not work best for your individual and unique resource usage. If you have a specific need for different partitioning you should escalate the request to your data center when requesting an OS reload or when provisioning a new server to migrate to.
 

nettigritty

Well-Known Member
PartnerNOC
Jan 21, 2004
192
0
166
Bangalore, India
I seem to have stumbled on a new issue with this error. The error pasted below even after clearing out space.

usage shows:

52% /usr

and yet, WHM shows:

The /usr partition on this server is running out of disk space. WHM operation has been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition.
Any ideas?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I seem to have stumbled on a new issue with this error. The error pasted below even after clearing out space.

usage shows:
52% /usr

and yet, WHM shows:
Code:
The /usr partition on this server is running out of disk space. WHM operation has been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition.
Any ideas?
ran upcp --force - either that or the time it took to complete, fixed the error (which may have been cached disk quota).
While I am not certain if this would help in your situation, I would suggest that if the error is triggered in the future, following corrective measures to correct the disk space issue, to attempt a restart of cPanel to see if that helps alleviate the error that was displayed. Via root SSH access the following command may be used to restart cPanel:
Code:
# /usr/local/cpanel/startup
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Had tried restarting cpanel a few times. Didn't help.
If the symptoms reoccur and persist I would consider escalating the issue via a support request; this is necessary so that the difficulty may be thoroughly investigated. Please let me know the ticket ID number (e.g., via a PM) upon submitting the support request so that I may follow-up internally. For reference, the links in my forums signature may be used to initiate a ticket submission (e.g., Support Options).