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
  • Avid Amoeba
    link
    fedilink
    46
    edit-2
    1 month ago

    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.
    • @[email protected]
      link
      fedilink
      01 month ago

      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.

      • Avid Amoeba
        link
        fedilink
        11 month ago

        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.

        • @[email protected]
          link
          fedilink
          11 month ago

          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.

          • Avid Amoeba
            link
            fedilink
            21 month ago

            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.

  • @[email protected]
    link
    fedilink
    43
    edit-2
    1 month ago

    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.

      • @[email protected]
        link
        fedilink
        English
        31 month ago

        Wasn’t that the entire purpose of ext4 vs ext3? As the default, I also keep journaling on for ext4 partitions. Even /boot.

        • @[email protected]
          link
          fedilink
          21 month ago

          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.

      • @[email protected]
        link
        fedilink
        31 month ago

        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

  • @[email protected]
    link
    fedilink
    251 month ago

    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

    • Avid Amoeba
      link
      fedilink
      121 month ago

      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.

      • @[email protected]
        link
        fedilink
        51 month ago

        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.

        • @[email protected]
          link
          fedilink
          11 month ago

          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.

      • @[email protected]
        link
        fedilink
        21 month ago

        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.

  • Scott
    link
    English
    221 month ago

    ZFS, got 5 system with different zpools

      • Scott
        link
        English
        51 month ago

        I do have 1 system with ZFS mirror boot drives

          • @[email protected]
            link
            fedilink
            21 month ago

            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.

          • Scott
            link
            English
            1
            edit-2
            1 month ago

            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 zfs*

  • @wargreymon
    link
    201 month ago

    Google cloud storage, copilot my files with Microsoft, crowdstrike running in background for better security.

  • @[email protected]
    link
    fedilink
    171 month ago

    BTRFS raid on LUKS-encrypted devices (no LVM, all unlocked with one password via SystemD encrypt hooks).

    • PsyhackologicalOP
      link
      fedilink
      11 month ago

      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.

      • @[email protected]
        link
        fedilink
        21 month ago

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

      • @[email protected]
        link
        fedilink
        English
        31 month ago

        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.

        • @[email protected]
          link
          fedilink
          31 month ago

          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.

  • @[email protected]
    link
    fedilink
    131 month ago

    Btrfs for everything these days, subvolume snapshots have been game-changing for me for doing backups.

  • @[email protected]
    link
    fedilink
    121 month ago

    Been running BTRFS since 2010. Ext2/3/4 before that.

    Using it for CoW, de-duplication, compression. My home file server has had a long-lived array of mis-matched devices. Started at 4x2TB, through 6x4TB and now 2x18+4TB. I just move up a size whenever a disk fails.

    • PsyhackologicalOP
      link
      fedilink
      21 month ago

      That’s sound fantastic! Interesting that you didn’t mentiona anything about snapshots. Have you had some isshes with BTRFS since then?

      • @[email protected]
        link
        fedilink
        11 month ago

        Well, snapshots, too. I just consider them to be a special case of de-duplication.

        I had an issue when I ran out of space during conversion between RAID profiles a few years back. I didn’t lose any data, but I couldn’t get the array to mount (and stay) read-write.

    • Possibly linux
      link
      fedilink
      English
      -21 month ago

      Btrfs isn’t stable in big configurations. The big issue is that resilvering takes a long time and hurts performance. ZFS is the right answer.

      • @[email protected]
        link
        fedilink
        21 month ago

        Linus says no.

        I’m sure it’s great and all, but the hassle of having a filesystem that’s not in the kernel is a no-starter for me. Maybe one of those fancy NAS-distros that are based on some *BSD.

        • Possibly linux
          link
          fedilink
          English
          01 month ago

          Linux works fine with ZFS. I wouldn’t use it as your boot device but for big storage it is very reliable and stable. It also can take advantage of ram with Arc and has optional special disks. (Metadata disk, slog and cache as an example)

  • thejevans
    link
    fedilink
    111 month ago

    ZFS all the things. On my workstations, I wipe / on every boot except for the files that I specify, and I backup /home to my NAS on ZFS and I backup my NAS snapshots to Backblaze.

      • @[email protected]
        link
        fedilink
        41 month ago

        Preventing unwanted state

        If you install and then uninstall something, it will almost certainly leave logs, configurations and other garbage in places you don’t expect. Next time you want to use it, it isn’t the clean install you expected