3 ms·
My experiences have been as such: With the exception of accidentally enabling deduplication on a 16 TB array on a system with 8 GB of RAM, ZFS has been fantast
by danudey 7y ago
My experiences have been as such:
With the exception of accidentally enabling deduplication on a 16 TB array on a system with 8 GB of RAM, ZFS has been fantastic. Everything works, and works much as you'd expect. The tools and concepts are clear and concise and it's obvious that a lot of work was put into everything from the design to the documentation.
btrfs, on the other hand, has been a nightmare. I set it up on a new desktop machine earlier this week, and I've spent most of this afternoon trying to recover data from it. Due to a power outage, the filesystem is corrupted. I didn't know that right away because I enabled zstd compression in the filesystem but GRUB couldn't boot/read zstd files/filesystems, etc.
A lot of btrfs is counterintuitive, or downright worrying. Most of the threads I've seen regarding filesystem errors end with "I reinstalled and everything is fine". The documentation suggests not trying to `btrfs check --repair`, because apparently that's the wrong way to do things? You should try to mount with the 'recovery' mount flag instead, which is not intuitive.
In my case, the kernel is throwing an error about the checksum map, but it can't rebuild it or repair the filesystem. In a rescue image it errors because it tries to call pthread_cancel but can't load libgcc for whatever reason, so I can't rescue my system from a rescue system.
Even when it did work it was confusing. Unlike ZFS, btrfs subvolumes seem... counterintuitive? On ZFS I can take a recursive snapshot of a volume or subvolume and any subvolumes it has, which allows me to divide a subtree up into multiple subvolumes but still treat it the same (e.g. if I want multiple entries in /var/lib/mysql/<mysql_instance> or something similar). On btrfs, you cannot do recursive snapshots, and I've even seen some people describe this as one of the (few) reasons you'd use subvolumes: to exclude something from snapshots.
After ten years, it feels as though btrfs is 90% done; that is to say, it has 90% of the functionality it should, that those features are 90% done, and that what is done works about 90% of the time.
Honestly, with the state that btrfs is in, I don't understand why it's in the kernel at all, and why distros support it (but I do understand why RHEL pulled it). Working with it directly makes me worry for the data I have stored on my synology, and now I'm wondering if I should have just built a FreeNAS box instead.
TL;DR btrfs is a giant mess and you shouldn't use it. ZFS has more up-front overhead (getting the package versions configured for Ubuntu) and is more difficult to go all-in on (e.g. ZFS root) but at least you won't lose your data out of nowhere.