#1 (permalink)  
Old 10-25-2009, 08:54 PM
Registered User
 
Join Date: Oct 2009
Posts: 2
tedy is on a distinguished road
How to reduce space in /usr partition?

Hi,

There is similar thread, but I can`t find any useful information in it, so I've opened another one.
My /usr partition is filling up about 5% per day.

Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.7G 6.6G 2.7G 72% /usr

The problem is that I have no idea where/which files are filling up.
I've deleted ALL logs in /usr/local/apache/domlogs but it caused like 1% of space.

Here are all files which exceed 20MB on /usr

/usr/lib/locale/locale-archive: 54M
/usr/bin/php: 20M
/usr/lib64/xulrunner-1.9/libxul.so: 23M
/usr/local/apache/modules/libphp5.so: 21M
/usr/local/apache/logs/error_log: 26M
/usr/local/apache/logs/access_log: 31M
/usr/local/cpanel/cgi-sys/php5: 20M
/usr/local/cpanel/cpanel: 31M
/usr/local/cpanel/whostmgr/bin/whostmgr5: 28M
/usr/local/cpanel/whostmgr/bin/whostmgr: 34M
/usr/local/cpanel/whostmgr/bin/whostmgr2: 35M
/usr/local/cpanel/whostmgr/bin/xml-api: 27M
/usr/local/cpanel/bin/wwwacct: 21M
/usr/local/bin/php: 20M

As you can see, there is no any big file like log or something.

I've also tried to set logs in rotation(WHM) but it didn`t help either.

Last edited by tedy; 10-25-2009 at 09:00 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-26-2009, 09:36 PM
Registered User
 
Join Date: Oct 2009
Posts: 2
tedy is on a distinguished road
I've just found out another strange think:

# du -sh /usr
3.3G /usr

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.7G 6.6G 2.7G 72% /usr


Any replies appriciated
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-26-2009, 09:43 PM
Registered User
 
Join Date: Jul 2008
Location: localhost
Posts: 87
chinmay is on a distinguished road
Hi..

Please try the command below. It will find for the files consuming much disk space.
Quote:
find /usr -size +1000000000c
Note :: find command might increase the load on server.
__________________
Chinmay || webteches || My Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-26-2009, 10:18 PM
cPanelDon's Avatar
cPanel Staff (Administrator)
 
Join Date: Nov 2008
Location: Houston, Texas, U.S.A.
Posts: 1,511
cPanelDon is on a distinguished road
Lightbulb

I suggest using "du" to gradually search deeper levels of directories within the "/usr" partition.

The following command could be used as a starting point:
Code:
# du -ahx --max-depth=1 /usr
To check levels deeper, simply append more directory structure to the path, such as the following examples:
Code:
# du -ahx --max-depth=1 /usr/local
# du -ahx --max-depth=1 /usr/local/apache
# du -ahx --max-depth=1 /usr/local/apache/logs
# du -ahx --max-depth=1 /usr/local/cpanel/logs
I recommend reviewing the manual "man" page for "du" to become more familiar other options and usage examples:
Code:
# man du
__________________
For hands-on assistance please reference our new support information page: Where should I go for support?
cPResources: Support Options - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation
-- cPanelDon - Donald Holl, Technical Analyst, cPanel Technical Support
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-28-2009, 03:03 AM
Registered User
 
Join Date: Apr 2009
Posts: 225
InstaCarma_Tech is on a distinguished road
Hope this helps :

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.
__________________
InstaCarma
Outsourced Web Hosting Technical Support and Server Management

To visit out Blog , click here
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reduce disc space / mysql query oldlock cPanel Newbies 1 06-05-2009 10:41 PM
How to reduce space in usr partition : killall -9 httpd sebans cPanel and WHM Optimization 5 05-15-2009 08:47 AM
/usr partition full danielco cPanel and WHM Discussions 3 07-26-2008 08:17 AM
My /usr partition is full - what do i do? Dragons Master cPanel and WHM Discussions 7 07-24-2005 09:46 PM
resize partition /usr powerflash cPanel and WHM Discussions 6 07-07-2005 03:45 AM


All times are GMT -5. The time now is 10:09 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc