The message “No Space left on Device” prevents you from creating new files, like i.e. when extracting an archive or compiling new software. But df outputs, that there is still space available!?
Well it’s likely both are right.
The error can show up in two circumstances:
- The disk is full, no more space is left on the device. This is obviously not the case, as df tells different.
- No more I-Nodes are available. Check with df -i
Each file or directory on a filesystem needs an I-Node. If the number of I-Nodes is too small, there may still be space left on the device, but the number of remaining I-Nodes is not sufficient. This problem occures, if a filesystem is configured to have a low I-Node per SIze ratio or if the filesystem has many small files or many hardlinks pointing to the same content.
To change this, at least on ext3, the filesystem needs to be recreated. During creation of a filesystem the -i paramter has to be set explicitly to a lower value. The default value for Debian 6.0 is 16384 bytes per inode. The value can be looked up (and changed) in /etc/mke2fs.conf. Of course it does not make sense to set a value lower then the disks block size. For older harddrives the value would be 512 newer have 4k of blocksize.