Futuregeek Futuregeek - 1 year ago 174
Linux Question

No space left on device

When i tried to scp some files to a centos machine, I am getting the error "No space left on device"

I tried

[root@...]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01 18G 18G 0 100% /

And when I do

du -sh /
-> it gives only 5G

[... ~]$ df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
4685824 209516 4476308 5% /

seems like file system is full.
How can i find which one is taking these much size?

Answer Source

Such difference between the output of du -sh and df -h may happen if some large file has been deleted, but is still opened by some process. Check with the command lsof | grep deleted to see which processes have opened descriptors to deleted files. You can restart the process and the space will be freed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download