Just a simple question : Which file system do you recommend for Linux? Ext4…?

EDIT : Thanks to everyone who commented, I think I will try btrfs on my root partition and keep ext4 for my home directory 😃

        • File system is a core component of any electronic system. Even if it’s just 1% less stable than other ones, it’s still less stable. Maybe it’s faster in some cases and supports better backups but ehh idk if it’s worth it. Losing documents is something you probably want to avoid at all costs

          • Yeah, but it isn’t noticeably “less stable” if at all anymore* unless you mean stable as in “essentially in maintenance mode”, and clearly good enough for SLES to make it the default. Stop spreading outdated FUD and make backups regularly if you care about your documents (ext4 won’t save you from disk failure either which is probably the more likely scenario).

            * not talking about the RAID 5/6 modes, but those are explicitly marked unstable

            • My short BTRFS history

              1. Installed on a 1TB NVME
              2. used for 2 years
              3. Rebased my system a ton, used rpm-ostree a ton (which uses BTRFS for the snapshots I think?)
              4. Physically broke the SSD by bending (lol used a silicon cooler pad but it bent it) which resulted in hardware crashes
              5. With dd barely managed to get all the data onto a 1TB SATA SSD
              6. dd-ed the SATA SSD onto a 2TB NVME
              7. deleted and restored the MBR, resized the BTRFS partition to max, resized the BTRFS filesystem to max, balanced it

              Still works, never had a single failure

              • I suppose by being more efficient, “using modern technology” (everything saving Google, Meta, Amazon etc. money and is thus extremely well funded, all server related stuff), is good for the environment.

                If something runs faster on the same hardware, it may use less energy. It may also just be restricted in hardware usage, like not using multithreading.

                Linux Distros shipping x86_64-v2 packages is a whole other problem…

      •  Mereo   ( @Mereo@lemmy.ca ) 
        link
        fedilink
        10
        edit-2
        6 months ago

        I disagree. My partition is ext4, but Timeshift saved my ass when an upgrade went wrong. I just had to restore the system from a previous snapshot taken before the upgrade.

          • I never tested BTRFS on SSDs under 128GB or even HDDs, but never had a corrupted one.

            Those anecdotes are worth little so it would be best to have current data.

            One of the above points was that the claims are outdated, which would be really interesting to verify.

            Like, making a study with many different parameters

            • hdd, sata ssd, nvme ssd, emmc, etc.
            • size: 50-200MB, 1GB, 16GB, 128GB, 500GB, 4TB (from small embedded, to IOT, to usb flash drive, to smartphone, to laptop, to Server/Backup)
            • amount of usage: percentage filled, read/write per minute
            • BTRFS actions: snapshots, balance, defragment
          • If full backups aren’t possible that’s an administrator failure.

            Reliance on a file system to never fail rather than have proper backups, is an administrator failure.

            ANY system can, and will, fail. Thinking and behaving otherwise is an administrator failure.

            “Everything gets gone, sooner or later” - being prepared for it is good administrator behaviour.

            • Yes but why intentionally choose a worse option? Sorry but it’s not very smart imo.

              And not having enough space is not an administrator failure. It’s usually budget issue. And are you saying that making apps bloated (like severely bloated) is ok and the user should always be blamed for having lower hardware?

      •  lemmyreader   ( @lemmyreader@lemmy.ml ) 
        link
        fedilink
        English
        7
        edit-2
        6 months ago

        Good that you mentioned that. Reminded me that I have an Arch Linux install here where I forgot that I did choose BTRFS during installation. Within maybe a month I noticed FS errors. Looked scary. Nervously searching for documentation was even more scary :

        https://wiki.archlinux.org/title/btrfs#btrfs_check -> This article or section is out of date. (Discuss in Talk:Btrfs) Warning: Since Btrfs is under heavy development, especially the btrfs check command, it is highly recommended to create a backup and consult btrfs-check(8) before executing btrfs check with the --repair switch.

        What is this? My beloved Arch Wiki is not 100% perfect!

        Then found this :

        WARNING: Using ‘–repair’ can further damage a filesystem instead of helping if it can’t fix your particular issue.

        Warning

        Do not use --repair unless you are advised to do so by a developer or an experienced user, and then only after having accepted that no fsck successfully repair all types of filesystem corruption. E.g. some other software or hardware bugs can fatally damage a volume.

        I figure this explains the popularity of BTRFS snapshot configurations. Luckily I had some backups :)

        • Filesystem snapshots won’t help, if the filesystem itself corrupts. But I’ve been using BTRFS for 6 years now and haven’t had a file system corruption, so mileage may obviously vary.

  • Honestly, unless there’s some specific thing you’re looking for just use your distro’s default. If your distro doesn’t have a default I’d probably default to ext4. The way most people use their computers there’s really no noticeable advantage to any of the others, so there’s no reason not to stick with old reliable. If you like to fiddle with things just to see what they can do or have unusual requirements then btrfs or zfs could be worth looking into, but if you have to ask it probably doesn’t matter.

    •  catloaf   ( @catloaf@lemm.ee ) 
      link
      fedilink
      English
      26 months ago

      Agreed, ext4 is a perfectly fine default for the os. Xfs is also a good choice. I have my os on ext4 and data on xfs and I’ve never had issues. My only headache is LVM, because I don’t actually need the additional flexibility it offers. (And mdraid is flaky, but I think that’s because of how I set it up. Maybe you aren’t supposed to use a whole drive, you’re supposed to partition it first?)

  • In my opinion, it depends. If a distro has BTRFS configured to automatically take a snapshot when upgrading (like OpenSuse Tumbleweed), then BTRFS.

    If not, for a beginner, ext4 + timeshift to take snapshots of your system in case an upgrade goes wrong will be fine.

  •  Adanisi   ( @Adanisi@lemmy.zip ) 
    link
    fedilink
    English
    246 months ago

    ext4 has been battle-tested for many years and is very stable. Doesn’t have the same fragmentation and data loss issues certain other filesystems like NTFS have.

  • Btrfs. Just format as one big partition (besides that little EFI partition of course) and don’t worry about splitting up your disk into root and home. Put home on its own subvolume so that root can be rolled back separately from it. You can have automatic snapshots, low-overhead compression, deduplication, incremental backups. Any filesystem can fsck its own metadata, but btrfs is one of the few that also cares if your data is also intact.

    • It cares so much that when it goes wrong you can’t even mount the partitions as readonly to try get your data back. It will stubbornly hold on to it and refuse any access at all. Boy I am so glad it didn’t let me access a potentially corrupted byte somewhere!

  • As someone who ran BTRFS for years, I’m personally switching back to EXT4. Yes, the compression and other features are nice, but when things go wrong and you have to do a recovery, it’s not worth the complexity

  • Ext4 for most home users, because it’s simple and intuitive. Btrfs for anyone who has important data or wants to geek out about file systems. It’s got some really cool features, but to actually use most of them you’ll have to do some learning.

  • Just go with whatever is the default of your distribution.

    That said I’ve come to love the automatic snapshots OpenSUSE gives me with BTRFS. I think they use snapper to automate that. It does a snapshot before and after every packet install, update or removal. And it has some system to delete snapshots that aren’t needed anymore but it always keeps enough to give you peace of mind, especially when you’re experimenting.

    I should look into keeping some snapshots of my ~ as well. And I should implement that especially for my family.

    • Snapper is life saver. I don’t get it why nobody else use it by default, it’s so great. It saved me many times. My coworker, who happens to be kind of non-linux user forced there by MS bullshit, uses Ubuntu and she’s got to problems so many times, and all those would be couple clicks repair with Snapper…

  • Btrfs. It was the default filesystem already when I used Fedora on both my personal and work laptops. Not a single problem. It is true I don’t really make much use of most of its advanced features like snapshotting, CoW, etc., but I also didn’t notice any difference whatsoever in stability compared to ext4 so I’m pretty happy with it as my new default.