It's possible to bump into Error: no space left on device
while there are still plenty of space. One possibility is you run out of inode
.
Check to make sure there are still disk space.
df -h
Check if there are still inode
.
df -i
You might run out of inode faster than disk space when you have many small files.
Check for which directory have the most files.
sudo find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
The only solution is to delete unused small files or move them to another disk.