A few months ago I was reading about the many benefits of BTRFS like snapshot-ing, copy-on-write, corruption detection and the like, and I thought it might be a good idea to try it on both my main system and my raspberry pi. How wrong I was 😛
BTRFS – the rundown
BTRFS may eventually replace EXT4 as the default Linux filesystem, so I was excited to see what it had to offer. It offers a lot, but the features I was interested in are mentioned above. I knew it might be a bit slower, but I thought the increase in stability would be worth it. Because of the copy-on-write feature, I wasn’t using it for the partition that holds my virtual machines. So, firstly I saw that there was a converter that could take an EXT4 partition and convert it to BTRFS, and you could even roll-back the changes.
Disclaimer: The tool has been noted to be unreliable by some people and to be “not thoroughly tested on newer kernels as of 4.0”, so it may well be responsible for the issues I had later. I decided to try it anyway, because I’m clever 😛
I used this a few months ago, so I can’t remember exactly how it worked, but it was very clever. It worked on both my raspberry pi and the main system, with no apparent issues, though I of course made a backup first, because I’m not completely stupid XD. It WAS a bit slow, but expecting it to be fast is probably being a bit optimistic given how much data I have XD
It was just fine at first. A little bit slower, as I had thought it might be, but just fine. I happily used the main system for a few weeks, and then disaster struck: my system crashed, and I was forced to reboot. I’m not sure what caused the crash, but after that I couldn’t mount my BTRFS partitions any more! I know both my drives are healthy, so it definitely isn’t due to that. Then, I thought, I’ll just use the rollback tool, seeing as I can. That crashed with a segmentation fault, and after that I couldn’t try again, so I had to restore the backup.
It didn’t matter, because I didn’t lose anything important, but a bit weird. The Pi was still fine, so I let it be, thinking I might have just had some freak error. A few weeks later, it crashed as well, with exactly the same symptoms! The rollback worked fine with the Pi though, and it was fast too.
It’s a shame, because I was really looking forward to this. I’d heard that BTRFS was a lot more stable recently, so I had high hopes, although it isn’t yet “stable”. I had thought that meant there might have been a small chance of minor problems, but it turns out there isn’t really a file system checker, either, so it’s hard to fix even minor problems. I’m sure I’ll try this again, at some point, but I may use a virtual machine or something next time. The last time I tried it, a few years back, it was in a virtual machine, and it didn’t work at all, so this is definitely better 🙂
I have some more posts coming soon, so stay tuned!