Check what's the disk usage with
df -k
and
df -i
The first command will tell you how much diskspace (in terms of kilobytes) is available
and the second one will do the counting for inodes . If you have a huge number of small files the partition may have still free diskspace, but run out of inodes (which if you don't know about them, you can see like 'slots' in a parking space)
Ok, so if you effectively are running out of inodes, the only way to fix it is to reformat the partition using different parameters. If you cannot do that, you can try to mitigate the problem by moving part of the 'inode-hungry' section of data to a different partition.
Starting from /home top level, you can run this simple script (apologies if it's not 100% fool-proof ;-) )
for dir in *; do [ -d "$dir" ] && echo "$dir" && find "$dir" | wc -l; done
It should count for each subdirectory how many inodes are used (in short, each file or directory present).
You can repeat the procedure going down a few levels if you want.
Anyway, once you identify the directory that consumes most of the inodes, you can move it to somewhere else, and leave inside /home a symlink to the new location.
Shorter that that, your only chance is to archive (with tar, zip or similar tools) the part of data in /home directory that you are not currently using (and remove the loose files). This will bring the inodes count down, but at the cost of continuously archiving/unarchiving pieces of the storage.
fsck -f /dev/sdb
(or whatever is your disk). You can't runfsck
on mounted filesystem, though.df
.