Thoughts After Running btrfs for a Month

| Comments

It feels like it was a million years ago that I was just playing around with btrfs. I am not playing around any longer—my primary workstation (also known as my laptop) has been running btrfs as its root file system for a little over a month now.

I haven’t run any benchmarks, because I don’t want to know if it tests any slower than ext4. The machine feels pretty much exactly like it did before the switch, and that is good enough for me. The only thing btrfs has been absolutely terrible at is storing QEMU/KVM disk images. That’s a bit disappointing because copy-on-write snapshots and file clones of virtual machine disk images would be quite awesome, especially once deduplication hits btrfs.

How I Configured my Subvolumes

The first thing I did was store my / in its own subvolume. This makes changing your default root subvolume easier if you later decide you don’t have a need for the original again (if something like an apt-get dist-upgrade goes awry). It also lets you keep the real default btrfs subvolume unmounted and out of the way.

I ended up with five subvolumes:

  • / – The operating system and config files
  • /home – All my local user home directories; there is only one user
  • ~/wip – My “work in progress” directory. Most anything I am working on. I broke this one out because it is the volume I am most likely to manually snapshot
  • ~/tmp – Junk. Garbage. Mostly I untar and compile things here. This one gets its own subvolume because it is likely to fill up with junk that I won’t need. If I run low on space I can clobber old snapshots of this without even giving it much though.
  • ~/Downloads – My default web browser download folder. Almost exactly like the ~/tmp directory.

This layout has mostly been working pretty well. I like that I can snapshot /home without accidentally storing copies of useless data in ~/tmp and ~/Downloads. I bet I have saved a few gigabytes by not snapshotting any Linux kernel compiles sitting in ~/tmp.

Unfortunately, I realized I would always like a snapshot of ~/wip with every snapshot of /home. It isn’t a big deal in practice because it is simple enough to script.

The Verdict

I’m very happy with btrfs. The performance is great for me in all but one use case. I’ve been wanting proper read/write copy on write snapshots on my workstation ever since the first time I read about zfs a few years ago. I’m so happy to finally have them!

I haven’t yet noticed any corruption (I hope!). However, I am running backups way more often than I ever did. I lost data to a file system corruption once (reiserfs on my dual Intel Celeron 366). While running ext3 and ext4 I was really only worried about hardware failure. Now I am worried about hardware and software failure, which makes me quite a bit more nervous.

Comments