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
I bcachefs for my games, I like that it lets me havemultiple disks with redundant data copies, plus ssd caching of frequently accessed files, this fs is linux specific for now as far as I know, and is still experimental. I use ext4 for everything else, and FAT32 for flash drives.
Bcachefs is ready for real use?
In my use it has been pretty stable so far with 7 disks participating (3 caching SSDs, 4 mechanical disks, with 3 copies of metadata and 2 of data), but I’m not using the more experimental features like erasure coding, I will note the on-disk-format has changed twice since it has been in the kernel, and it hasnt been there long, but it has succeeded both on-disk-format upgrades without obvious data loss, and it recently got self healing for some checksum errors, Id say its probably ready for use if the data is backed up, replaceable, or can be gone without (so for me games are all I have that fits this). Otherwise I would use caution if you use it, but I am very optimistic about the future of the FS, as Kent Overstreet (the creator) has taken a lot of care with it.
I’ve only been put off with how slow it is in phoronix latest benchmarks
That’s fair, it has changed a bit since then and I’m hoping we get another filesystem benchmark to see if it has improved, and the caching features might offset that on frequently used data, but I don’t know how hard that would be to benchmark.
Oh, didnt know that was posted, some of the tests seem to be different from last time, it hasnt regressed but hasnt improved much yet either (from the ones that were the same). It does seem to have pulled ahead of BTRFS since the last test, doubling score in the DBench test, but it still varies a lot compared to the other filesystems it seems, doing worse pretty regularly.
How well a file system recovers from crashes or corruption.
fall guysBtrfs, for the compression and CoW. I’ve been using it since a couple years. It seems stable for my use. I need to fully wrap my head around how snapshots work, though.
You mentioned CoW. I’m really taking advantage of this because I have multiple Wine prefixes that have lots of duplicate data. I want to give every application it’s own prefix, and my underlying file system allows me to duplicate the blocks so the prefixes are basically free where before it’s several hundred megabytes just to make a new prefix.
ext4 on everything except external drives where I put NTFS.
So you have a dual boot or Windows machines I’m guessing for any of these
- Microsoft Office
- Gaming
- Adobe
I don’t dual boot, I just have some other Windows machines that I use rarely for Windows-only software that require an external connection, like Odin for Samsung devices.
Ext4 and ZFS.
- Ext4 for system disks because it’s default in OS installers and it works well.
- 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.
Depends on the device and the use case, mostly FAT32, exFAT, NTFS, EXT4
ext4 because I value my data and don’t want to lose it. I used to mess about with ZFS for mass storage but it’s a university course to learn how to use and have decent performance.
I used to use XFS, but ext4 caught up.
And I used to use XFS… on something other than Linux.
Most of my drives are EXT4, but I started using BTRFS a couple years ago and will be using it on all new installs from now on. I really like being able to make snapshots and compression reduces the install size quite a bit.
Btrfs, but if I’d start from scratch today I’d go for bcachefs.
Even now?
ZFS, got 5 system with different zpools
On root?
Mine is
Manual setup?
I’m on freebsd, it’s the default out of box/installer
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.
Ext4 is the only good FS so that’s what I use.
Many different file systems are successfully used in production on a large scale that aren’t EXT4.
Are you sure this is the only good FS? I know it’s solid and stable and used for many years as default Linux’s FS but I disagree that’s the only good one.
ext4, but the btrfs activity visible in the kernel changelog has slowed down recently after a long period of many bug fixes, so maybe I’ll give it a try next time.
same
Whatever my installation CD had as default 😂. I’m guessing ext4?
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.
That’s sound fantastic! Interesting that you didn’t mentiona anything about snapshots. Have you had some isshes with BTRFS since then?
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.
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.
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)
Just ext4 on my Linux things; I got scared away from btrfs because of some file loss horror stories
Ext4 is prone to corruption as it doesn’t have much error detection. Whatever you do don’t lose power.
Ext4 is prone to corruption as it doesn’t have much error detection. Whatever you do don’t lose power.
I use Ext4 since 20 years in all of my systems. And I had my fair share of power loses. It’s not a problem as you describe, because Ext4 is journaling. Ext4 is robust and one should not worry to lose data randomly.
Quote from: https://www.pcmag.com/encyclopedia/term/journaling-file-system
A file system that contains its own recovery capability in the event of a failure. In a journaling file system, the information about the changes is recorded in a separate log (the journal) before the indexes to the files are updated. If a power or other system failure corrupts the indexes as they are being rewritten, the operating system can use the log to repair them when the computer is restarted.
I have had it get corrupted. This isn’t an issue on btrfs and zfs
I believe you and understand that Ext4 is not 100% fail proof. But my point is, its extremely rare that Ext4 would corrupt the filesystem or files, even in an event of power loss (depending on many factors off course). I use Linux as my main OS since 2008 and since then Ext4. And I do not have these problems. My point is, Ext4 is a good and reliable option for day to day usage on a desktop PC, without worrying to lose data.
Also BTRFS isn’t stable for too long now and only a reliable option for a few years. Depending on the configuration, both filesystems can be a safe option to use. I agree that BTRFS has some benefits, including extended security over the data. I also plan on using it in the future. My only concern is, how you frame it and tell people how fragile Ext4 is, while it is not. Its a safe and good option for everyone, without the need for additional tools and special care like its needed with BTRFS.