Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2008

    Drive Space Warning on server


    I just got this email today, don't know how to remove unused space in that drive or what to do exacly, please help in advice.

    Drive Warning: /dev/sda2 (/usr) is 81% full

  2. #2
    Try to check the size of the error logs and access_logs on the server and try to empty it.
    # cd /usr/local/apache/logs
    # ls -sh error_logs
    # ls -sh access_logs
    check here if the size is in the gb for error_logs and access_logs then try to empty them.

    # echo > error_logs
    # echo > access_logs
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  3. #3
    Join Date
    Aug 2009
    Are you familiar with df command? It's really useful when you need to check which directories use most of space Web Hosting - First class web hosting services.
    Boxbilling - Complete billing, invoicing and client management system.

  4. #4
    Join Date
    Oct 2003
    The Netherlands
    from a shell execute:

    sudo du -h -s /*

    This will tell you the size of each folder, you can then go deeper as needed to find where the space is going.
    For example on one of my machines this yields:

    7.7M /bin
    12M /boot
    28K /dev
    55M /etc
    821M /home
    261M /lib
    18M /lib64
    16K /lost+found
    16K /Maildir
    4.0K /media
    4.0K /misc
    4.0K /mnt
    4.0K /net
    29M /opt
    2.1G /proc
    34M /root
    33M /sbin
    20K /selinux
    4.0K /srv
    0 /sys
    72K /tmp
    1.5G /usr
    202M /var

    You can probably sort these if you want, like so:

    sudo du -h -m -s /* | sort --numeric

    This will list the directories in the order of size (mb), with the biggest folder at the bottom.

    You can also tail this to only get a top 10 of sorts:

    sudo du -h -m -s /* | sort --numeric | tail

    18 /lib64
    29 /opt
    33 /sbin
    34 /root
    55 /etc
    202 /var
    261 /lib
    821 /home
    1493 /usr
    2058 /proc

    You can ignore /proc
    Folders to watch are /home (usually where the user files and sites are stored), /var (contains logs), /tmp (contains temporary files)
    /root is basically root's home folder

  5. #5
    Join Date
    Sep 2008
    [email protected] [/usr/local/apache/logs]# ls -sh error_log
    12G error_log
    [email protected] [/usr/local/apache/logs]# ls -sh access_log
    210M access_log
    [email protected] [/usr/local/apache/logs]#
    and now after echo the logs and error log

    [email protected] [/usr/local/apache/logs]# ls -sh access_log
    8.0K access_log
    [email protected] [/usr/local/apache/logs]# ls -sh error_log
    12K error_log
    [email protected] [/usr/local/apache/logs]#
    Thats what usefull Thanks Inspiron,

    /dev/sda2              20G  3.5G   15G  19% /usr
    And Hosting 24 here the resualt for hd -f

    [email protected] [/usr/local/apache/logs]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda5             9.7G  3.7G  5.6G  40% /
    /dev/sda8              93G  2.4G   86G   3% /home
    /dev/sda7            1008M   39M  918M   5% /tmp
    /dev/sda3              15G  7.4G  6.5G  54% /var
    /dev/sda2              20G  3.5G   15G  19% /usr
    /dev/sda1              99M   43M   52M  46% /boot
    tmpfs                1009M     0 1009M   0% /dev/shm
    /var/tmpMnt          1008M   39M  918M   5% /tmp
    none                 1009M     0 1009M   0% /dev/shm
    [email protected] [/usr/local/apache/logs]#
    It's look That Inspiron helps was really good...

    Bvs[NL], here is my resualt

    [email protected] [/usr/local/apache/logs]# sudo du -h -s /*
    0       /access-logs
    12K     /aquota.user
    4.0K    /backup
    7.2M    /bin
    39M     /boot
    84K     /dev
    96M     /etc
    2.3G    /home
    255M    /lib
    4.0K    /lost+found
    8.0K    /media
    0       /misc
    8.0K    /mnt
    0       /net
    24M     /opt
    0       /proc
    4.0K    /quota.user
    40K     /
    79M     /root
    29M     /sbin
    12M     /scripts
    8.0K    /selinux
    0       /service
    8.0K    /srv
    0       /sys
    5.5M    /tmp
    568K    /tmp_backup
    3.5G    /usr
    7.3G    /var
    3.1G    /vz
    [email protected] [/usr/local/apache/logs]#

  6. #6
    A simple way to clean apache log
    download Freeware client WinSCP
    go to derectotry /usr/local/apache/logs
    and delete manually

  7. #7
    Join Date
    Dec 2005
    It's much better to clear logs. Delete them and you might end up causing yourself problems if they are not automatically created, or created with the wrong permissions.

    The best thing to do is implement log rotation, so your logs are compressed, stored and then emptied.

    Based on the message you recieved I'll assume this is a cPanel server. In which case cPanel can rotate logs for you automatically, just look for the option in WHM when logged in as root

  8. #8
    Hv faced this log issue when I used suphp. it consumes very large ammount of space.

Similar Threads

  1. Drive Space Warning on server
    By Maxell in forum Hosting Security and Technology
    Replies: 11
    Last Post: 08-28-2009, 11:40 PM
  2. WHM/Cpane: Disable or change drive space warning
    By ytjohn in forum Hosting Software and Control Panels
    Replies: 2
    Last Post: 02-01-2009, 06:22 AM
  3. Disable Drive Space Warning Emails
    By jumpinjack in forum Hosting Security and Technology
    Replies: 1
    Last Post: 05-20-2008, 04:16 AM
  4. Drive Space Warning Question
    By uniquelinks in forum Dedicated Server
    Replies: 1
    Last Post: 04-19-2006, 02:57 AM
  5. Replies: 5
    Last Post: 06-09-2004, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts