I have an openSUSE computer that started with BtrFS early (like Leap 42.2).
At one moment in the past the /tmp subvolume had become full (one big file) and I was not able to recover space until reboot (
rm had triggered a
No space left on device). Then everything looked sound for at least one year.
But recently (at Leap 15.1 in the meantime) BtrFS got full again, and I wondered what to do: I had many snapshots like this:
# ls -l /.snapshots/ total 4 drwxr-xr-x 1 root root 32 Dec 18 2015 1 drwxr-xr-x 1 root root 32 May 14 09:45 1820 drwxr-xr-x 1 root root 66 May 14 09:46 1821
drwxr-xr-x 1 root root 32 Aug 8 08:08 1926 drwxr-xr-x 1 root root 38 Aug 8 08:09 1927 drwxr-xr-x 1 root root 38 Aug 8 08:12 1928
After having checked all the blocks checksums sucessfully (no problems) I started a "balance" hoping for some free space to appear. But balance never seemed to finish, so I tried to abort it. Having waited at least 15 minutes for balance to abort, I rebooted the computer to try something else. At that time the filesystem was 99% full.
I thought I'd clean up the oldest snapshot (
rm -rf /.snapshots/1.
Unfortunately after finishing, essential programs from
/usr had vanished and my system had become unbootable!
So my question is: Is that expected behavior, or did I do something wrong? If I did something wrong, what is the correct procedure to remove old snapshots?