centos 100% disk full - How to remove log files, history, etc?

Posted by kopeklan on Server Fault See other posts from Server Fault or by kopeklan
Published on 2010-12-22T06:25:40Z Indexed on 2010/12/22 6:55 UTC
Read the original article Hit count: 265

Filed under:
|
|

mysqld won't start because disk space is full:

101221 14:06:50 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
101221 14:06:50 [ERROR] Can't start server: can't create PID file: No space left on device

running df -h:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              16G  3.2G   12G  23% /
/dev/sda5             4.8G  4.6G     0 100% /var
/dev/sda3             430G  855M  407G   1% /home
/dev/sda1              76M   24M   49M  33% /boot
tmpfs                 956M     0  956M   0% /dev/shm

du -sh * in /var:

12K     account
56M     cache
24K     db
32K     empty
8.0K    games
1.5G    lib
8.0K    local
32K     lock
221M    log
16K     lost+found
0       mail
24K     named
8.0K    nis
8.0K    opt
8.0K    preserve
8.0K    racoon
292K    run
70M     spool
8.0K    tmp
76K     webmin
2.6G    www
20K     yp

in /dev/sda5, there is website files in /var/www.

because this is first time, I have no idea which files to remove other than moving /var/www to other partition

And one more, what is the right way to remove log files, history, etc in /dev/sda5?

© Server Fault or respective owner

Related posts about disk

Related posts about diskspace

  • diskspace in ubuntu

    as seen on Super User - Search for 'Super User'
    I have installed windows and ubuntu side by side .and given the diskspace of 10GB in an another drive partition.after using two moths i have installed some software to it no it's not starting and writing on the screen that there is no diskspace so could not be started . what can i do now?but at starting… >>> More

  • scritp to create automatically ext4 and swap in unallocated diskspace

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    i've to install a number of machines. Some machines have windows 7 installed. Some machines not. The machines have 0 or 2 or 3 partitions. Every machine has enough free diskspace (20 to 250 GB) I installed an "golden client" and build an tar archiv of this client. Now, every client boots up a small… >>> More

  • nginx tmp file folder runing out of diskspace

    as seen on Server Fault - Search for 'Server Fault'
    I get mysql diskspace error Can't create/write to file '/tmp/#sql_777_0.MYI' (Errcode: 28) mainly because my ngnix server is writing file into the tmp folder which doesn't get clean up.. i added this command as per instructions on the nginx manual to the crontab but doesn't seems to be doing… >>> More

  • Mysql out of disk space

    as seen on Server Fault - Search for 'Server Fault'
    I have just finished developing a rails app which has a mysql db as a backend. The app is meant for high traffic and will store lots of information. I am planning to set up my own web server and host the site from it. If in future my disk space runs out i would want to expand by adding more space… >>> More

  • Checkpoint FW-1disk full

    as seen on Server Fault - Search for 'Server Fault'
    Hi, The logging filled the disk of the managment node. This cause the firewall nodes to start logging locally. After deleting some old logs, restarting the managment node logging is still being done locally at the firewall nodes. I have already done a fw fetchlogs on all firewall nodes to get the… >>> More