this post was submitted on 11 Sep 2023
68 points (98.6% liked)

Linux

48254 readers
622 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 26 comments
sorted by: hot top controversial new old
[–] [email protected] 30 points 1 year ago

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.

[–] [email protected] 20 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 19 points 1 year ago

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.

[–] [email protected] 18 points 1 year ago (1 children)

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.

[–] [email protected] 15 points 1 year ago (2 children)

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.

[–] [email protected] 7 points 1 year ago

This was specifically about non system disk though

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 9 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 6 points 1 year ago

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.

[–] [email protected] 2 points 1 year ago

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.

[–] [email protected] 1 points 1 year ago (1 children)

I'd say it's essential on a SMR drive

[–] [email protected] 2 points 1 year ago

But don't use those, they're vastly inferior.

[–] [email protected] -3 points 1 year ago (2 children)

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).

[–] [email protected] 29 points 1 year ago* (last edited 1 year ago) (2 children)

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.

[–] [email protected] 7 points 1 year ago (2 children)

I thought RHEL is going with ext4 or btrfs these days. I know Fedora is on btrfs, while Debian & Ubuntu is on ext4.

[–] [email protected] 11 points 1 year ago (2 children)

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.

[–] [email protected] 9 points 1 year ago (1 children)

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?!)

[–] [email protected] 5 points 1 year ago

Lennart Poettering has entered the chat

[–] [email protected] 2 points 1 year ago

Is Red Hat the next canonical?

[–] [email protected] 7 points 1 year ago

Fedora’s gone the btrfs route, RHEL has all but given up on btrfs, pushing xfs

[–] [email protected] 0 points 1 year ago (2 children)

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.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 0 points 1 year ago

It says it is "a" standard file system - not "the" standard. Very different things.

[–] [email protected] 9 points 1 year ago (1 children)

Well, both SUSE and Fedora use BTRFS as the default file system, RHEL uses XFS, etc.

[–] [email protected] 1 points 1 year ago (1 children)

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.

[–] [email protected] 1 points 1 year ago

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.