Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    May 2004
    Posts
    56

    Default Freen up soma hdd space on CPanel?

    Currently we have an old CPanel server with 60Gb hdd, it shows more than 90% disk ussage but listaccts show only about 13Gb are actually used by user accounts, backup is done on another disk. Is there a way to free up some space on this server?

  2. #2
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    506

    Default

    Run the command "df -h" on the server and paste the output here. Space can be made free but I would suggest that you take help from someone who knows that what to delete and what not to delete.

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  3. #3
    Member
    Join Date
    May 2004
    Posts
    56

    Default

    here is the result df -h

    Filesystem Size Used Avail Use% Mounted on
    /dev/hda5 53G 47G 2.9G 95% /
    /dev/hda1 99M 8.4M 86M 9% /boot
    /dev/hda3 1012M 35M 926M 4% /tmp
    none 502M 0 502M 0% /dev/shm
    /tmp 1012M 35M 926M 4% /var/tmp

  4. #4
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    506

    Default

    Alright then this is how you should proceed:

    du -ah --max-depth=1 /

    It will show you the disk usage for all directories at / partition. So cd into the folder that is consuming the maximum space and run du -ah --max-depth=1 sitting there and so on...

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  5. #5
    Member
    Join Date
    May 2004
    Posts
    56

    Default

    Quote Originally Posted by WebScHoLaR View Post
    Alright then this is how you should proceed:

    du -ah --max-depth=1 /

    It will show you the disk usage for all directories at / partition. So cd into the folder that is consuming the maximum space and run du -ah --max-depth=1 sitting there and so on...
    But are there any common cases of what can consume so much space? And what is safe to delete and what not, is there any FAQ on it?

  6. #6
    Member sehh's Avatar
    Join Date
    Feb 2006
    Location
    Europe
    Posts
    461

    Default

    Some time ago i opened a thread about this issue.

    cPanel has a major bug, or at least a problem that nobody is willing to fix, even though we've opened a bug report.

    basically, after a few months or a year, your server will consume all its disk space because cPanel doesn't clean up after itself.

    Here are a few things we found:

    1) /etc/httpd/logs, some logs like the "suexec_log" are not rotated. Also, some /etc/httpd/domlogs/*ssl* are also not rotated. We've added a bunch of lines in logrotate to fix that.

    2) /home/.cpan and /home/.cpcpan, those will consume GIGs or terabytes with garbage and old data files. We've added a bunch of cron jobs to delete both directories once a week.

    Other popular directories with trash, include /usr/local/cpanel/3rdparty, but i can't be sure what you can delete from there.

    So far cPanel developers have been ignoring this and refuse to make their update script clean up after it self, that should have solved the problems in /home/.cpan.

  7. #7
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by sehh View Post
    Some time ago i opened a thread about this issue.

    cPanel has a major bug, or at least a problem that nobody is willing to fix, even though we've opened a bug report.

    basically, after a few months or a year, your server will consume all its disk space because cPanel doesn't clean up after itself.

    Here are a few things we found:

    1) /etc/httpd/logs, some logs like the "suexec_log" are not rotated. Also, some /etc/httpd/domlogs/*ssl* are also not rotated. We've added a bunch of lines in logrotate to fix that.

    2) /home/.cpan and /home/.cpcpan, those will consume GIGs or terabytes with garbage and old data files. We've added a bunch of cron jobs to delete both directories once a week.

    Other popular directories with trash, include /usr/local/cpanel/3rdparty, but i can't be sure what you can delete from there.

    So far cPanel developers have been ignoring this and refuse to make their update script clean up after it self, that should have solved the problems in /home/.cpan.
    Note that log rotation is built into cpanellogd and suexec log rotation was introduced in recent builds. Is cpanellogd running on your server? If not, that can lead to logs filling up the hard drive, and if the logs get over 2 GB in size, software (most notably, Apache) can begin malfunctioning.

    What is the bugzilla ID number?

  8. #8
    Member sehh's Avatar
    Join Date
    Feb 2006
    Location
    Europe
    Posts
    461

    Default

    Yes its running, but that never helped:
    29787 ? SN 0:13 cpanellogd - sleeping for logs

    I've opened loads of bugzilla reports, one of them is about stale files:
    5805, 5935, 5942, 6030, 6049, etc...

  9. #9
    Member
    Join Date
    May 2004
    Posts
    56

    Default

    It seems that /home/virtfs take about 22Gb of space, is there anything I can do with it?

  10. #10
    Member sehh's Avatar
    Join Date
    Feb 2006
    Location
    Europe
    Posts
    461

    Default

    I believe /home/virtfs is a hardlink, so it doesn't take any extra space, it should only report the space already being used by the stuff it links to.

    or am i completely wrong? :P

  11. #11
    Member
    Join Date
    May 2004
    Posts
    56

    Default

    Quote Originally Posted by sehh View Post
    I believe /home/virtfs is a hardlink, so it doesn't take any extra space, it should only report the space already being used by the stuff it links to.

    or am i completely wrong? :P
    But is it reported to the system 2 times or just once?

  12. #12
    Member sehh's Avatar
    Join Date
    Feb 2006
    Location
    Europe
    Posts
    461

    Default

    i don't know really, if cPanel is counting the used space of hardlinks then thats a bug. i sure hope they aren't doing that.

    one thing is for sure, the "du" command does NOT count them twice, unless you specify the "--count-links" parameter.

Similar Threads & Tags
Similar threads

  1. How setup cpanel on HDD without system HDD
    By divuso in forum New User Questions
    Replies: 2
    Last Post: 07-03-2009, 06:48 PM
  2. Accounts transferrinng from old HDD to new HDD.
    By DrYurich in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-09-2006, 08:13 AM
  3. diminishing hdd space
    By filth in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 09-30-2006, 07:52 AM
  4. Wrong Partions on HDD - reconfigure HDD space
    By KimBO in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-27-2005, 10:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube