I want to learn more about file systems from the practical point of view so I know what to expect, how to approach them and what experience positive or negative you had / have.
I found this wikipedia’s comparison but I want your hands-on views.
For now my mental list is
- NTFS - for some reason TVs on USB love these and also Windows + Linux can read and write this
- Ext4 - solid fs with journaling but Linux specific
- Btrfs - some modern fs with snapshot capability, Linux specific
- xfs - servers really like these as they are performant, Linux specific
- FAT32 - limited but recognizable everywhere
- exFAT - like FAT32 but less recognizable and less limited
Every year I buy a couple ~$5 USB drives and plug them into my jbod machine in a software raid1. At this point there’s about a hundred in long array of daisy chained USB hubs.
Each drive is formatted with fat32 and added to an LVM. Don’t judge my ghetto NAS.
Amazing shitpost
I would love to see a complete post about this.
how fast is it?
Roughly the same speed of my dick slicing through frozen butter at the North Pole on January 1st, 1993
LOL
I’m pretty much all BTRFS at this point
Me too, but why in your case?
Filesystem compression is dope.
I am now all-in on bcachefs. I don’t like btrfs, cause you still sometimes read about people loosing their data. I know that might happen with bcachefs too since it’s early days still but fuck it. I like the risk.
Filesystem level compression and encryption are so nice to have.
I don’t like btrfs, cause you still sometimes read about people loosing their data.
That was only on RAID setups. So if you have only a singular disk, as opposed to an array, you’re fine. And that issue has been fixed for a while now anyways.
I’ve been running btrfs on my laptop’s root partition for well over a year now and it’s fine.
I get the feeling I’ll become a bcachefs fan for those reasons in the future (I tested it on a spare laptop as soon as 6.7 got into Debian Testing), but for now, I use a mix of ext4 and btrfs, as bcachefs-tools isn’t in Testing. It is trivial to apt-pin, but I try not to make FrankenDebian a regular thing. I have a feeling that they’ll iron it out and Bcachefs will be an option in Trixie by the tome it hits stable, if still with a /boot partition considering the slow state of Grub support.
I think Linux users must have some touch of masochism. Also this might interest you: https://www.phoronix.com/review/linux-611-filesystems But me too, I’ve just installed Cosmic DE PopOS 24.04 for my main laptop.
True true, I’m planning to go balls deep too since it have good raid capability
ext4 because its the default and works fine
Never doubted it. Do you use journaling feature on it?
Wasn’t that the entire purpose of ext4 vs ext3? As the default, I also keep journaling on for ext4 partitions. Even /boot.
ext3 had journaling, but not ext2. Also ext3 doesn’t really exist anymore as it was merged into the ext4 driver which can read the old format.
I like ext4 because it’s easy. If anything breaks, ANY live USB can fix it. I use fat32 for my removeable drives, because anything can read it. I don’t use journalling for anything manually, but I imagine it’s useful when my disk crashes because I let my laptop die
ZFS on TrueNAS SCALE (enables RAID-like functionality, along with many other features).
Ext4 or NTFS on everything else, simply because it’s default and I don’t use any advanced features.
Nice! What hardware are you using with ZFS on TrueNAS SCALE?
Yeah simplicity beats everything when you only use basic features.
Old dual-core Pentium, lol (Haswell I think, or something from around that time), 16GB RAM. 5 16TB SATA hard disks.
I use BTRFS on my Artix system, Ext4 on my Librem 5, Ext4 on my Devuan laptop and Ext4 on my Pinebook Pro. Basically when given the choice in the installer I choose BTRFS but if the installer doesn’t let me pick I don’t care enough to manually partition. I have had no negative experiences with any file system luckily so I just roll with whatever.
NTFS support is pretty solid on Linux these days, but just so you know, never use it as a root partition.
I have generally used ext4. There’s ways to massage it to mount on Windows, as with btrfs. Ext4 is very likely what you should do if you’re installing Linux for the first time, as it has had decades of testing and is rather battle-tested
I recently did my first btrfs install. For now, I’ve had no issues. Of course, some could happen, but I’ve generally heard btrfs is fine these days. One of its cool things is native compression support, although I forgot to enable it when I did that install.
I’ve never used XFS.
FAT32 should be rarely used these days due to file size limits and file name limits. The only place where it should still be used is for your EFI partition.
Now exFAT really isn’t that unrecognizable. It’s supported by pretty much every operating system these days. It’s definitely not for root partitions, but should be your default for flash drives and portable hard drives.
On another note, I recently tried Bcachefs on Debian Testing on a random old Chromebook. It is still in development, and not all distros support it yet, but I liked what I saw from my limited experience. It also supports snapshots, and unlike btrfs, has native encryption. For now, just ignore it, but like many in this post have said, keep an eye out for it.
As for ZFS, I’ve never tried it. The main caveat is due to licensing incompatibility, it is not in the standard Linux kernel and you have to do some special stuff.
Great answer thanks for this!
I agree with everythinf but exFAT, some devices expect either FAT32 or NTFS. I had this issue when I wanted to play totally acquired big mkv movie through USB and because of that FAT32 wasn’t an option so I went with exFAT. Not visible but apperantly it liked NTFS. It was the LG TV, my parents have 2 and same issue on both.
My pleasure. The LG problem is unfortunate. Most other devices tend to support exFAT, but LG is an exception, albeit a very big one due to its pervasiveness as a brand. I do have an LG TV, but an older one that’s getting annoying to the point it’s tempting to throw a Roku behind it. Also, do you have a laptop with HDMI? That could also be a solution.
Also, for context, part of my exFAT leanings are that while NTFS is read-only on Mac, exFAT is read-write. I’d presume as I am, you’re not a frequent Mac user, but I’ve had situations in the past where I had to use one.
I saw it too. I dislike Mac but when I’m forced to be around them I’m trying to make them work as they should. The problem is for me they are more closed and hostile to this than Windows but that’s probably because I was a Windows user so much time.
I have similar feelings about Mac, probably in part because of my former Windows use as well. On one hand, I like how Mac’s terminal and development workflow (e.g availability of gcc) are more natively Unix-like, but for that, there’s also limited OpenGL support and no Vulkan support. Meanwhile, making Windows more “Unix-y” is as simple as installed Cygwin, and fixing the menu is simple a matter of installing OpenShell. (Of course, having to contort Windows gets annoying after a while, thus why I use Linux these days.)
Yeah let’s skip the part that average Mac consumer that I know does not know terminal is. 😆 But it was a bizzare to me when someone could extract the zip archive from the GUI but I helped through terminal.
Honestly, just strike out Mac. I one time opened the Windows Command Prompt in front of someone and they were like “DOS?” 😂
Yeah it is like a solution but the most “native” and straight forward was formating to NTFS.
Ext4 cause that’s the default and I’m lazy.
That’s a valid reason too. However sometimes btrfs has become the default ;)
Not in Mint.
Yeah I think Ubuntu and Debian based distro prefers it for stability reasons. Fedora I think switched to btrfs by default.
Based
Ext4 and ZFS.
- Ext4 for system disks because it’s default in OS installers and it works well. I typically use it on top of LVMRAID (LVM-managed mdraid) for redundancy and expansion flexibility.
- ZFS for storage because it’s got data integrity verification, trivial setup, flexible redundancy topologies, free snapshots, blazing fast replication, easy expansion, incredible flexibility in separating data and performance tuning within the same filesystem. I’d be looking into setting up ZFS on root for my next machine. Among other things that would enable trivial and blazing fast backup of the system while it’s running - as simple as
syncoid -r rpool backup-server:machine4-rpool
.
Thank you little amoeba 🦠
biased random walk dance
I’d be looking into setting up ZFS on root for my next machine
I too was on the path of adventure once but then the kernel module hasn’t been built after the upgrade. Also btrfs offers some nice features for root especially that zfs doesn’t have.
It’s one of the reasons I use Ubuntu LTS, the ZFS module is bundled by default.
Also btrfs offers some nice features for root especially that zfs doesn’t have.
Oh? Elaborate pls.
You can boot straight into snapshot, may be useful if an update went wrong or you don’t like new kde.
You can change drives and raid configuration online. For example I bought a laptop that had windows preinstalled, so I used the second half of the disk space for linux, then I figured I don’t need windows so I formatted windows partition to btrfs, added it as a new device, moved all the data there, deleted the old linux partition and extended the new one to the whole drive, all that easy and without reboot.
Oh nice. I think that all of those are possible with ZFS too. Although I’m pretty sure that the snapshot-boot is done outside of ZFS itself. As in, there’s something else that takes the snapshots and makes them available to the bootloader. I think zsys used to do that in the experimental ZFS-on-root support that shipped in Ubuntu 20.04. I recall having a snapshot appear before every update and those snapshots were selectable from GRUB.
Btrfs cause I’m limited on storage rn. So the compression saves me good amount of space.
Is there a way to tell how much space compresses? Would that be a game changer for instatlling games I wonder.
Yes. You need to install compsize . Wouldn’t call it a game changer but i only have 256gb ssd so it’s a life saver for me.
compsize -x /
A combination of XFS and ZFS. I work in high performance computing (academic). While I love the reliability of ZFS for data archival and peace of mind that results provably haven’t suffered bitrot, sometimes I just need a 10 TB temp file(s) with fast mostly-sequential R/W. Appropriate selection of file systems lets me have both.
As an aside, I’ve been watching bcachefs with some interest, as it seems to be getting faster with every kernel release, building on the data integrity guarantees of ZFS while pushing performance boundaries and being GPL compatible (i.e. in tree). Kent Overstreet et al. have done a fantastic job with this FS.
ZFS where possible for maximum reliability
It also has self healing, no “partitions”, high performance, compression, smart drive redundancy without RAID holes, encryption, deduplication and an extremery intelligent cache called ARC
ZFS is completely ridiculous. It’s like someone actually sat down to design an intelligent filesystem instead of making a slightly improved version of what’s already out there.
…and that’s why Oracle fucked up the licensing on it. We are not allowed to have nice things.
I feel your pain on the CDDL (although I think it is still considered a “free” license), and while I love to hate Oracle, I think the CDDL decision was originally Sun’s, even if Oracle could “free” it now to be GPL.
I don’t ‘love’ to ‘hate’ Oracle. For much of my career it seems like they’ve gone out of their way to make things more difficult than they need to be. If I had to calculate how much time fighting with their projects cost me (compared to everything else), they’d be at the head of the list (with one more zero at the left of the decimal point than Microsoft).
Why though? AFAIK the CDDL totally allows us to have nice things. It’s similar to MPL and considered a free software license by the FSF. Sure it’s not GPL but it doesn’t disallow us from changing ZFS, using it, even commercially.
I don’t really understand why the linux community complains about the licencing. I’m sure openzfs overcame that. In the freebsd world it’s native on root straight out of the box
Yeah there’s no essential problems with it in itself as free open source software. Legally it doesn’t seem compatible with the Linux kernel source code, as in you can’t compile it into the kernel but it seems to be okay to load it as a binary module, prebuilt or built on demand.
Yet practically no distros support it out of the box
And on root? Can practically forget it
Sad
Well Ubuntu is the most popular distro and it supports it out of the box. It’s had experimental ZFS-on-root support since 2020. Unfortunately it needs more work to be to be promoted from experimental status. But yeah, I don’t know of any other diatros supporting it on root out of the box. Which is sad.
Holy xfs is probably not close to that?
XFS is simply a journalling filesystem.
ZFS is a COW filesystem and volume manager with compression, block management, and an adaptive read cache.
Kind of an apples-to-oranges comparison.
Technically XFS is also a CoW filesystem, but it doesn’t have the vast array of features that ZFS does like volume management, snapshots, send/recv etc. It does have reflink support which I guess is a kind of snapshot for a file.
Well, encryption is very much not a strong point of zfs. I agree on all other points tho.
Actually native encryption has been a feature of ZFS for a few years now. It’s nice not having to have an extra LUKS layer.
Yeah, but it’s had some actual data corruption bugs related to sending encrypted snapshots (off the top of my head).
Not really bugs, the process for zfs send differs with encrypted snapshots. Make sure you consult the docs. Always test your backups to make sure you cloned properly
Btrfs for everything these days, subvolume snapshots have been game-changing for me for doing backups.
Could you please elaborate on doing backups with btrfs?
Sure, I pretty much use the method explained here for weekly backups: https://fedoramagazine.org/btrfs-snapshots-backup-incremental/
Not only is there btrfs support for Windows, but since windows and linux root structures don’t conflict, someone got both arch and windows booting from the same partition. Is it a good idea? Hell no. But can it be done? Apparently yes.
Btrfs main boot drive
Xfs main storage drive
exFAT external “archive” drive (easy to connect to Windows machines if ever I need my backup in someone else’s windows machine in an emergency and such)
So you went for exFAT when you want to throw some data onto external drive? I think you could also got away with NTFS in your case.
Idk, exFAT is meant to be compatible with more stuff than NTFS. If I ever decide to hook this HDD up to a console or smartTV to play the videos I have on it, it is guaranteed to work.