Potentialy dumb question here, is there any benefit to using btrfs on a non system disk? I’m fairly ignorant on file systems, asfaik btrfs largest benefit is snapshotting, not sure of anyothers.
The main benefits to BTRFS over something like ext4 tends to be considered as; the subvolume support - which is what’s used for snapshotting, the granluar quotas, reflinks, transparent compression, and the fact that basically all filesystem operations can be performed online.
I’m personally running BTRFS in a couple of places; NAS, laptop, and desktops. Mainly for the support to do things like snapshots and subvolumes, but I also make heavy use of both reflinks and compression, and I’ve also made use of online filesystem actions quite a few times.
For a data disk? Absolutely, even if you’re not going to configure anything, you can copy inside the partition instantly and detect the bitrot.
If you’re willing to step it up a notch, there’s also cool stuff like transparent compression, deduplication and incremental send/receive of entire subvolumes.If you have steam, btrfs compression will dramatically shrink the size of an installed game with zero performance impact. In some cases, the disk read speed even increases.
Using btrfs makes a lot if sense on a NAS, because it allows you to make snapshots in a nice way. It also has some features that give your data better odds of survival if something goes wrong.
It’s very useful to have on a desktop too. If you break something or have an issue with an update, you can restore a snapshot and be back up and running in less than a minute.
This was specifically about non system disk though
It certainly is very useful there as well. Depending on the kind of system you have and how you use it, this feature may be absolutely crucial or simply nice to have. If you like to tinker a lot, it’s probably crucial.
non system disk
That really depends on what you mean by that? Is it an internal or external drive, what sort of drive is it (HDD, SSD etc), and what are you going to use it for, and are you planning to share the drive with other operating systems?
Because while btrfs is nice in general, you may find other filesystems more suitable, depending on your usage requirements.
I like BTRFS’s checksumming abilities and compression the most. BTRFS will keep track of every block of data’s checksum, and when you run a
scrub
it will detect bitrot. If you want to heal the bitrot you’ll need to run e.g. RAID1. RAID5/6 are not stable so don’t use those. ZSTD:1 compression is basically free storage with no downside, and can massively speed up file operations if you’re using spinning rust.Personally I run BTRFS on any disk that only needs a single drive, like OS disk or games drive. My NAS runs a ZFS array for any mass storage, which includes basically the same feature set as BTRFS, except RAID actually works and everything is a tiny bit better. A ZFS NAS isn’t very good unless you pump a decent amount of money into it to get it going, so if you’re on a tight budget I’d recommend MergerFS+SnapRAID backed by BTRFS disks, which is very similar to Unraid in terms of storage paradigm except free.
I usually just stick to the standard file system to any OS.
So for Linux that would be ext4.
For external drives i use either FAT32 (the ol’ reliable) or exFAT (the fastest for dealing with large files when you set the max allocation unit size AKA 32MB).
So for Linux that would be ext4.
It’s worth noting that the default file system varies by distro - there is no ‘Linux’ default. For example, RHEL et al use XFS as the default.
I thought RHEL is going with ext4 or btrfs these days. I know Fedora is on btrfs, while Debian & Ubuntu is on ext4.
RHEL is going hard on XFS, they’ve even completely removed BTRFS support from their kernel - they don’t have any in-house development competency in it after all. It’s somewhat understandable in that regard, since otherwise they wouldn’t necessarily be able to offer filesystem-level support to their paying customers.
Though it is a little bit amusing, seeing as Fedora - the RHEL upstream - uses BTRFS as their default filesystem.
If there is one thing one can learn from the Linux community at large is how to agree on absolutely nothing and still be friends (mostly, that is. As long as Linus isn’t involved. Then the gloves are off. Who dared to put rust in the kernel?!)
Lennart Poettering has entered the chat
Is Red Hat the next canonical?
Fedora’s gone the btrfs route, RHEL has all but given up on btrfs, pushing xfs
make menuconfig says:
Ext2 is a standard Linux file system for hard disks.
And this for ext4:
This is the next generation of the ext3 filesystem.
But defaly indeed is ext4.
ext4 is literally just the latest version of the ext filesystem (AKA it has the most funcionality).
If you REALLY wanted MAX speed, you could make your system drive ext2, but you would lose some metadata, drive info & management tools.
It says it is “a” standard file system - not “the” standard. Very different things.
Well, both SUSE and Fedora use BTRFS as the default file system, RHEL uses XFS, etc.
openSUSE uses BTRFS as the default filesystem for / and if you have any additional disks (for example a separate home) it uses XFS by default. Unless that’s changed since the last time I installed.
When I worked through some AutoYaST setups for Leap 15.5 the default disk setup did BTRFS across the line, though that could definitely differ from doing the install interactively.
I use Btrfs on my secondary drives as well, just for the checksumming capabilities. If there is data errors, I would like to know about it (even if I cannot do anything about it, because I do not have redundancy set up). I have my fstab set up so that it mounts with
noatime,compress-force=zstd:1
Performance-wise, Btrfs has been improving a lot even in just the past few years. I think if I were using a very weak computer (like raspberry pi 1 strength) I would not use Btrfs or a CoW fs.
I’d say it’s essential on a SMR drive
But don’t use those, they’re vastly inferior.