1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The file system /dev/vzfs, which is mounted at /, has reached critical status because it is 97% full

Discussion in 'Server Configuration and Hosting' started by DaveL, Sep 1, 2013.

  1. DaveL

    DaveL Well-Known Member

    Hi,

    Ive just received this automated email saying:

    Ive had a google and performed a df -h which shows up:

    Filesystem Size Used Avail Use% Mounted on
    /dev/vzfs 44G 11G 367M 97% /
    none 1.0G 4.0K 1.0G 1% /dev

    Any idea whats likely to be in this folder? Im guessing backups? How do I access the folder to delete some of this to free up some space?

    Any help greatly appreciated!
     
  2. HWS

    HWS Well-Known Member

    I would take a look into the /tmp and the /var/log directories and delete old tmp files and old log files.
     
  3. DaveL

    DaveL Well-Known Member

    Hi HWS,

    What command would I need to use at root to clear my tmp files?
     
  4. HWS

    HWS Well-Known Member

    Please talk with your server admin about that.

    I'd not blindly delete all files in /tmp. Some of them may be important!

    But if you don't care:
    Code:
    rm -rf /tmp/*
     
  5. DaveL

    DaveL Well-Known Member

    Thats going to be a problem. Its a VPS from GoDaddy and there support isnt very good!

    I have no idea whats taking up all the space, as none of my sites are really that big.
     
  6. HWS

    HWS Well-Known Member

    Most likely it's the log files.
     
  7. DaveL

    DaveL Well-Known Member

    Is there an easy way to delete log files from putty?
     
  8. The Forum Heroes

    The Forum Heroes Well-Known Member

    cd /var/log
    ls -la (this will list all files and sizes in the folder)
    rm -rf filename.log
     
  9. DaveL

    DaveL Well-Known Member

    Thanks Mike. I carried out the first two commands and this was the result:

    total 176576
    drwxr-xr-x 7 root root 4096 Sep 1 18:11 ./
    drwxr-xr-x 22 root root 4096 Aug 29 02:58 ../
    drwxr-xr-x 3 root wheel 4096 Jun 8 11:52 bandwidth/
    -rw------- 1 root root 0 Jun 8 11:11 boot.log
    -rw------- 1 root utmp 24246912 Aug 30 20:46 btmp
    -rw-r--r-- 1 root root 15496440 Sep 1 18:08 chkservd.log
    -rw-r--r-- 1 root root 4882635 Jun 8 12:20 cpanel-install.log
    -rw------- 1 root root 36707524 Sep 1 18:12 cron
    drwx------ 3 root root 4096 Sep 1 18:10 dcpumon/
    -rw-r--r-- 1 root root 0 Jul 5 22:58 dmesg
    -rw-r--r-- 1 root root 0 Jun 11 20:30 dmesg.old
    -rw-r--r-- 1 root root 141490 Jun 8 11:15 dracut.log
    -rw-r----- 1 mailnull mail 14088511 Sep 1 18:11 exim_mainlog
    -rw-r----- 1 mailnull mail 8193 Jul 5 03:00 exim_paniclog
    -rw-r----- 1 mailnull mail 867124 Sep 1 18:11 exim_rejectlog
    drwx------ 2 root root 4096 Jun 8 11:11 httpd/
    -rw-r--r-- 1 root root 9347796 Sep 1 18:11 lastlog
    -rw------- 1 root root 39002142 Sep 1 18:09 maillog
    -rw------- 1 root root 21183673 Sep 1 18:08 messages
    -rw-r----- 1 mysql mysql 62158 Sep 1 17:57 mysqld.error.log
    -rw-r--r-- 1 root root 220 Jun 8 13:56 quota_enable.log
    drwxr-xr-x 2 root root 4096 Sep 1 00:00 sa/
    drwx------ 3 root root 4096 Jun 6 03:22 samba/
    -rw------- 1 root root 19047212 Sep 1 18:12 secure
    -rw-r--r-- 1 mysql mysql 4537539 Sep 1 17:57 slow_queries.log
    -rw------- 1 root root 0 Jun 6 03:22 spooler
    -rw------- 1 root root 0 Jun 6 03:22 tallylog
    -rw-rw-r-- 1 root utmp 29184 Sep 1 18:11 wtmp
    -rw-r--r-- 1 root root 3 Sep 1 02:58 xferlog.offset
    -rw-r--r-- 1 root root 1 Sep 1 18:11 xferlog.offsetftpsep
    -rw------- 1 root root 12973 Jun 12 10:58 yum.log
     
  10. Luke F

    Luke F Well-Known Member

    Look into 'ncdu'
     
    The Forum Heroes likes this.
  11. The Forum Heroes

    The Forum Heroes Well-Known Member

    You can also try deleting your httpd error log too

    rm -rf /etc/httpd/logs/error_log
    service httpd restart
     
  12. DaveL

    DaveL Well-Known Member

    Hi Luke,

    Sorry, whats ncdu?
     
  13. DaveL

    DaveL Well-Known Member

    Ok, tried deleting som log files, not sure its actually doing anything though as im still at 97% :confused:
     
  14. Slavik

    Slavik XenForo Moderator Staff Member

    You can also run

    Code:
    echo > logfile.log
    as an alternative without having to restart any services.
     
  15. Slavik

    Slavik XenForo Moderator Staff Member


    du -a / | sort -n -r | head -n 10
     
  16. The Forum Heroes

    The Forum Heroes Well-Known Member

    Try this too as I see from your ls printout your using cPanel..

    rm -fv /home/$user/backup-*$user.tar.gz ; done

    rm -fv /home/*/tmp/Cpanel_*

    rm -rfv /home/*/fantastico_backups if you use Fantastico.
     
    DaveL likes this.
  17. DaveL

    DaveL Well-Known Member

    Hi Mike,

    The first command wouldnt work - said -
    I ran the second command and thats taken me down to 87% - so heading in the right direction!

    Filesystem Size Used Avail Use% Mounted on
    /dev/vzfs 45G 11G 1.6G 87% /
    none 1.0G 4.0K 1.0G 1% /dev
     
  18. DaveL

    DaveL Well-Known Member

    Do I run that as root, or when im in the var directory?
     
  19. The Forum Heroes

    The Forum Heroes Well-Known Member

    oh, maybe the "done" was incorrect. Try just rm -fv /home/$user/backup-*$user.tar.gz;
     
  20. Slavik

    Slavik XenForo Moderator Staff Member

    Run it where ever,

    the du -a / will scan it from root for you.
     
    DaveL likes this.

Share This Page