The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Workarounds and Optimization' started by ns1, Jan 22, 2009.

  1. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    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:
    root@server2 [/usr/local]# cd ..
    root@server2 [/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    .
    root@server2 [/usr]# cd local
    root@server2 [/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    .
    
     
  2. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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.
     
  3. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    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
     
  4. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I've checked
    /usr/local/cpanel/3rdparty/mailman

    and this is the usage of the directory
    HTML:
    root@server2 [/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:
    root@server2 [/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.
     
  5. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    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!:)
     
  6. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    331
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    I had the similar problem yesterday. It was 88% full. I checked the server and the error_log file was huge. I deleted it and problem solved.
     
  7. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    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?)
     
  8. laluvirtual

    laluvirtual Member

    Joined:
    Aug 31, 2006
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    i also face this problem look at this:
    Code:
    [root@cpanel 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    .
    [root@cpanel usr]#
    
    [root@cpanel 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
     
  9. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  10. Kevinfrom

    Kevinfrom Well-Known Member

    Joined:
    Jan 18, 2008
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  11. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
  12. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    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:
    root@server2 [/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    .
    root@server2 [/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?
     
  13. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
  14. ns1

    ns1 Active Member

    Joined:
    Aug 8, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    This server is at The Planet. How can it be that they have done this poor partitioning scheme?
     
  15. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
  16. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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:

    Any ideas?
     
  17. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore, India
    ran upcp --force - either that or the time it took to complete, fixed the error (which may have been cached disk quota).
     
  18. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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
     
  19. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore, India
    Had tried restarting cpanel a few times. Didn't help.
     
  20. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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).
     
Loading...

Share This Page