Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

Somehow my work-in-progress Python server filled the rootfs partition by logging 50gb of data to /tmp/blabla.log, which I noticed by basic commands failing like this: root@server:/# crontab -e /tmp/crontab.FfvjqH: No space left on device

So, I did rm -rf /tmp/blabla.log and the file disappeared, cannot be seen with ls or tail... but the insufficient space errors persist. df -h still reports that rootfs is 100% used and does not reflect that I removed the 50gb file.

I could free some more space by moving some files to another parition and the system is OK but I don't have my 50gb of free space back.

What could be the problem?


my own answer: After moving some 3gb of files from the rootfs partition, I dared to restart the server, at the risk of having the server nog restart due to disk-space problems, but luckily it rebooted successfully and after reboot df -h reported the correct amount of free space. So system reboot seemed to be the answer.

share|improve this question

marked as duplicate by ewwhite, ceejayoz, cjc, longneck, Dave M Feb 4 at 17:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

You have deleted the file but the file descriptor is still open and used by the running script. Stop the script and you should get the space back. It's a better idea to truncate the file with > /tmp/blabla.log or cp /dev/null /tmp/blabla.log

share|improve this answer
    
quiet possible, my Python server was being kept alive by runsv so I might have had to properly kill it first. –  Jurriaan Roelofs Feb 4 at 16:19

you might want to check with lsof if the file is still being held by the process/service. For instance with tomcat if u delete the catalina.out while the service is running it will "delete" the file but it will still be locked by the tomcat service until you restart. You can find this with lsof | grep <filename> and it will say (deleted) behind the hit if you have one.

share|improve this answer

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