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

Running OpenSuse 12.2.

Suddenly the root parition seems to be full (99%) but I can no longer remove files manually.

"rm: can not remove xxx: No Space left on device" although 450mb are still free according to df. The filesystem is BTRFS.

I tried checking the FS using btrfsck but it did not help.

What to do?

share|improve this question
1  
Do you have snapshots enabled? –  MadHatter Feb 14 '13 at 9:01
    
have you check if is there any process running still using the file ? (check with lsof), if so, please stop the process and try to remove the file again. –  chocripple Feb 14 '13 at 9:04

1 Answer 1

Most likely, you're running into a problem where BTRFS has to allocate a bit of metadata before it can remove the file. One of BTRFS's weak spots is its handling of the out-of-space condition; improving behavior in this area is one of the project's priorities.

One suggestion on the btrfs wiki is to clobber the file instead of removing it.

#instead of this
rm -f ./some_file

# do this
true >| ./some_file

That'll remove the file's contents without changing the directory entry. Once you've worked your way out of the corner you're in, you can then delete files like normal. If that gives you trouble, you may want to temporarily remount with the nodatacow option, which turns off the copy-on-write behavior. But... not sure for certain if that will help or not.

In general, though: don't run a BTRFS filesystem dry. It's still pre-production software, and the corner cases are a little rough.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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