Can someone tell me, why is this 100% used on the /?

How can I fix this problem? I'm not a unix admin, I'm a programmer but can read the books.

[root@datasrv /]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              7757352   7757248         0 100% /
/dev/sda1               248895     15027    221018   7% /boot
/dev/sda9            120098680   3173944 110725656   3% /data
tmpfs                   777052         0    777052   0% /dev/shm
/dev/sda5              3882508    128136   3553964   4% /home
/dev/sda7              1945132     35888   1808840   2% /tmp
/dev/sda6              7757320   4728956   2627948  65% /usr
/dev/sda3              7757352    571420   6785512   8% /var

Follow up:

I deleted some files then ran my rsync program which syncs from a windows mount share drive to a USB drive. It doesn't write to the local Centos disk as far as I know. Then suddenly the disk drive is full again, why? Does rsync do something that creates lots of files somewhere?

  • 2
    as root, run du -sh * in / and see where all the space has gone. – Tom O'Connor Jul 27 '10 at 11:28
  • 1
    My bet would be on /opt or /root or both ... – Sven Jul 27 '10 at 11:32
  • 1
    Heh. We've got a FreeBSD box here that claims that / is 108% full and it still runs fine, maybe it's time to go to BSD. ;-) ;-) – Brian Knoblauch Jul 27 '10 at 12:44
  • What is the full rsync command you're running? – Matt Jul 27 '10 at 14:56
  • Is this a virtual machine or physical? – JMeterX Jul 19 '13 at 19:57

Find big files and remove them if possible:

find / -mount -size +8096 -ls
find / -mount -name core -ls
du -sh /* (and repeat for subsequent dirs on /)

Probably something is flooding your / or you have to many old kernels. Cleaning up will help, your / should be big enough because you've a seperated /var and /usr (and /data ...).

Use ncdu.

If you want to check filesize of every directory right in the root, you can use du -h --max-depth=1 /. It'll take quite a while.

Check your .xsession-error file. You might refer to this post and see if it helps.

However, since you are running CentOS, I would look in /etc/x11/xinit for the xsession file. Also, remove the "quotation marks" around the file and get rid of $HOME.

One thing I see that causes the drive to fill up is the root mail. You might need to empty out your mail for root or whatever other user you need.

First

du -sh /var/mail/*

That should list your mailbox size. If one of them is huge like root just run this command to empty it

Second

> /var/mail/root

Make sure you add the greater sign

Your done!

  • /var is on a separate volume. Truncating root's email will not make any free space on / – Mircea Vutcovici Jun 6 '17 at 2:40
  • It worked for me today – Cesar Bielich Jun 6 '17 at 2:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.