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
Ext4 cause that’s the default and I’m lazy.
Based
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.
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
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 would love to see a complete post about this.
So would I. I’m really curious about how well it works.
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.
ext4 because its the default and works fine
Never doubted it. Do you use journaling feature on it?
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
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.
Not only is there btrfs support for Windows, but since windows and linux files 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.
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.
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.
I didn’t mean the license. I meant, it was a “fuck you” from Oracle.
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
ZFS, got 5 system with different zpools
On root?
I do have 1 system with ZFS mirror boot drives
Did you use an installer to do it or manual setup?
I started using it on my NAS and also on root. Then I switched my personal machine to ZFS on root. I manually created both setups (somehow). This is the worst part in my opinion. The best decision, though, was to ditch grub in favor of zfsbootmenu. Skips all the brittle steps with grub and its boot partition. Now I just have zfsbootmenu directly loaded by UEFI from the EFI partition. Everything important is directly on ZFS, including… well, everything. Can also use snapshots but I have not needed that yet.
Proxmox install on the zfs mirror boot plus some other pools, everything else is currently truenas single boot drive with pools
I do have other proxmox stuff running*
Mine is
Manual setup?
I’m on freebsd, it’s the default out of box/installer
Nice.
Google cloud storage, copilot my files with Microsoft, crowdstrike running in background for better security.
Apple chastity cage to prevent me from being tempted by Linux. /s
I wouldn’t be suprised if that’s the case for Windows users.
BTRFS raid on LUKS-encrypted devices (no LVM, all unlocked with one password via SystemD encrypt hooks).
Which RAID? I need to read about SystemD encrypt hooks because I know nothing. Also why not LVM? Is btrfs more flexible in partitioning when you want to extend it or shrink it? I heard that you can merge “partitions” on 2 different disks so they are visisble under one mount point.
Btrfs can mostly fo everything you would normaly use LVN or raid for natively.
Btrfs raid0 lets you combine any number of differently sized drives into one (just without the speed boost of traditional raid0 because with flexible drive sizes data is not symmetrical striped). And btrfs raid1 keeps every data duplicated, again with flexible number and sizes of drive (also with metadata on every drive).
The sytemd hooks (instead of the traditional busybox ones) then manage the one other task you use LVM for: unlocking multiple partitons (for example multiple raid partitons and swap) with just one password. Because the systemd encrypt function tries unlooking all luks partitions it finds with the first password provided and only asks for passwords for each partition if that doesn’t work.
PS: btrfs subvolumes are already flexible in size and don’t need predefined sizes. So the only things that need to be created separately are non-btrfs stuff like the efi system partition or a physical swap (which you can also skip by using a swap file instead of a partition).
ZFS
I see it’s the GOAT as fs
Edit: reasons added in because I can’t read the post title
- OpenBSD laptop: ffs2, vfat for efi system partition
- Why: Contrary to popular belief, OpenBSD does not support zfs. The only other filesystem options are msdos (fat family), and ext2fs (mostly for Linux compatibility as far as I can tell, filesystem is experimental and lacks a bunch of features according to the manpage). Makes ffs2 the only sane option.
- OpenBSD vps: ffs2
- Why: See above.
- Pinephone running PmOS: ext2 boot partition, ext4 root partition
- Why: Defaults.
- Void Linux VM: ext2
- Why: I prefer not having journaling on flash memory. This hasn’t bitten me in the ass too hard yet, and even when it does I can usually get around system files being lost with integrity tools. Maybe I’ll dabble with f2fs some day, but I’ll need to read about its features and shortcomings compared to ext2.
- Alpine Linux VM: ext4
- Why: Would have installed as ext2 as well, but I forgot
- Steam Deck: ??? (too lazy to check, 9/10 chance it’s ext4)
Yes the Steam deck FS is ext4.
Why ext2 on Void?
I prefer not using journaling filesystems on flash memory, I haven’t had any major data integrity issues yet because of it. I would have made the Alpine fs ext2 as well, but I guess I missed it during install. I think you can just disable journaling in ext4 anyways, so if I care enough I’ll just do that.
The Steam Deck uses btrfs on its internal storage.
- OpenBSD laptop: ffs2, vfat for efi system partition
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/
Btrfs in a luks container so it’s encrypted.
Great! Have you had any issues with this setup?
nope, it works really well, for more than a year now, this is my work PC using 8h/day, I’m using MX23 AHS version. Directly in the setup you can select encryption and btrfs volume etc. btrfs is pretty stable.
ZFS on anything storage related. Enterprise level snapshot and replica management.
How’s it better than XFS? I heard same things about it too.
ZFS is completely different than XFS. XFS is like a better (different?) ext4. ZFS is an error-checking software raid COW filesystem that does snapshots and can have multiple replicas, both local and remote. It uses zvols and datastores. Think btrfs on steroids and with a working raid subsystem.
It’s got a weird semi-closed license because Oracle is involved but it’s never been enforced and at this point is in such widespread use in large and small enterprises that it would be impossible to enforce.
OpenZFS is under a completely FOSS license but it’s incompatible with the GPL and can’t really ever be merged into the Linux kernel. The workaroundids to provide it as source code which gets compiled as a module every time there’s a new kernel via dkms.
More controversially, Canonical ship OpenZFS pre-compiled in Ubuntu which some lawyers believe to be infringing on ZFS’ codebase.
Honestly the OpenZFS situation on Linux is probably the biggest single reason for the growing interest in btrfs and bcachefs, the former slowly becoming default on more Linux distros over time and lots of investment from SUSE and Facebook AFAIK.
XFS does not do snapshots, replicas, and all the other myriad of things that ZFS does.
Ext4 for everything when possible, because its reliable and proven. I’m looking towards Btrfs for my next system drive, as it is mature now and has good features. But I would use Ext4 for everything else still. For interoperability that doesn’t understand Ext4 it would be NTFS when supported, otherwise fallback to FAT32.
That’s the entirety of my knowledge and what I use when I have to format it myself. :D
I respect your reliable and proven comment. I really love the features of BTRFS and that’s why I use it, but I also really care about my data. I have secondary installations that use EXT4 and work very well.