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
delirious_owl ( @delirious_owl@discuss.online ) 37•8 months agoEvery 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.
itslilith ( @itslilith@lemmy.blahaj.zone ) 11•8 months agoAmazing shitpost
slice ( @slice@feddit.org ) English5•8 months agoI would love to see a complete post about this.
The Doctor ( @drwho@beehaw.org ) English2•8 months agoSo would I. I’m really curious about how well it works.
Avid Amoeba ( @avidamoeba@lemmy.ca ) 37•8 months agoExt4 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
.
ryannathans ( @ryannathans@aussie.zone ) 19•8 months agoZFS 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 ( @avidamoeba@lemmy.ca ) 10•8 months agoZFS 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.
The Doctor ( @drwho@beehaw.org ) English1•8 months ago…and that’s why Oracle fucked up the licensing on it. We are not allowed to have nice things.
Avid Amoeba ( @avidamoeba@lemmy.ca ) 3•8 months agoWhy 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.
ryannathans ( @ryannathans@aussie.zone ) 4•8 months agoI 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
Avid Amoeba ( @avidamoeba@lemmy.ca ) 2•8 months agoYeah 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.
ryannathans ( @ryannathans@aussie.zone ) 3•8 months agoYet practically no distros support it out of the box
And on root? Can practically forget it
Sad
Avid Amoeba ( @avidamoeba@lemmy.ca ) 2•8 months agoWell 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.
The Doctor ( @drwho@beehaw.org ) English1•8 months agoI didn’t mean the license. I meant, it was a “fuck you” from Oracle.
ghjones ( @ghjones@beehaw.org ) 2•8 months agoI 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.
The Doctor ( @drwho@beehaw.org ) English1•8 months agoI 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).
Holy xfs is probably not close to that?
youRFate ( @youRFate@feddit.org ) 1•8 months agoWell, encryption is very much not a strong point of zfs. I agree on all other points tho.
ScottE ( @ScottE@lemm.ee ) 3•8 months agoActually native encryption has been a feature of ZFS for a few years now. It’s nice not having to have an extra LUKS layer.
ghjones ( @ghjones@beehaw.org ) 2•8 months agoYeah, but it’s had some actual data corruption bugs related to sending encrypted snapshots (off the top of my head).
ryannathans ( @ryannathans@aussie.zone ) 1•8 months agoNot 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
delirious_owl ( @delirious_owl@discuss.online ) 19•8 months agoext4 because its the default and works fine
Never doubted it. Do you use journaling feature on it?
billgamesh ( @billgamesh@lemmy.ml ) 5•8 months agoI 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
Empricorn ( @Empricorn@feddit.nl ) English4•8 months agoWasn’t that the entire purpose of ext4 vs ext3? As the default, I also keep journaling on for ext4 partitions. Even /boot.
theroff ( @theroff@aussie.zone ) 2•8 months agoext3 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.
teawrecks ( @teawrecks@sopuli.xyz ) 17•8 months agoNot 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.
Ooops ( @Ooops@feddit.org ) 12•8 months agoBTRFS 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.
Ooops ( @Ooops@feddit.org ) 2•8 months agoBtrfs 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).
thingsiplay ( @thingsiplay@beehaw.org ) 11•8 months agoExt4 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
henfredemars ( @henfredemars@infosec.pub ) English2•8 months agoI 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.
Gianni R ( @gianni@lemmy.ml ) English10•8 months agoI’m pretty much all BTRFS at this point
Me too, but why in your case?
Gianni R ( @gianni@lemmy.ml ) English2•8 months agoFilesystem compression is dope.
fossphi ( @fossphi@lemm.ee ) English9•8 months agoBtrfs, 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.
henfredemars ( @henfredemars@infosec.pub ) English4•8 months agoYou 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.
henfredemars ( @henfredemars@infosec.pub ) English9•8 months agoI care a lot about filesystems.
BTRFS in FS-managed RAID configuration for automatic self-healing and snapshots for instant automated backups (though I keep a traditional backup too for protection against bugs and user error).
Storage is cheap compared to how much I value my data. BTRFS has very good support on Linux, integration with some backup tools, and I really want to use a FS that has full data checksums to make sure the data stays correct at rest. I like that I don’t have to use equal sized drives and can use whatever I have available, though I would appreciate a better read distribution model rather than the current where it just chooses a random drive to read from when multiple copies are available.
Disadvantages include difficulty accessing from Windows in my experience, less than stellar performance on HDDs, not very space efficient for small files systems because of the bulky metadata, and some uncommon RAID types don’t work correctly and will eat your data. I also don’t recommend it for use over USB because many such devices don’t correctly implement sync, and this is very important to stay on the correct transaction number and prevent file system inconsistencies. If I had to boot from USB, I wouldn’t pick BTRFS.
I don’t think exFAT or FAT32 offer POSIX permissions. I’m not sure if you could have a root file system there.
Telorand ( @Telorand@reddthat.com ) 2•8 months agoSo, genuine question: why btrfs instead of zfs? Sounds like your use case would fit the latter.
Kualk ( @Kualk@lemm.ee ) 6•8 months agoBTRFS is zero effort on root, because it is included in kernel. ZFS on root is extra effort at least on Arch, due to licensing restrictions.
marty_relaxes ( @marty_relaxes@discuss.tchncs.de ) 1•8 months agoAdditionally, at least for my use-case btrfs benefits me since it is less picky about drive sizes being the same and duplicating everything correctly - letting you essentially just throw additional storage at it as you acquire it.
henfredemars ( @henfredemars@infosec.pub ) English3•8 months agoDoes ZFS handle data duplication on unequal sized volumes or heterogeneous pools? I don’t believe so, and BTRFS was a first class installer option.
jevans ⁂ ( @thejevans@lemmy.ml ) 9•8 months agoZFS 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.
Dataprolet ( @dataprolet@lemmy.dbzer0.com ) English3•8 months agoWhy do you wipe your root dir?
itslilith ( @itslilith@lemmy.blahaj.zone ) 3•8 months agoPreventing 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
ryannathans ( @ryannathans@aussie.zone ) 1•8 months agoapt purge is calling and would like a word
kittenroar ( @kittenroar@beehaw.org ) English9•8 months agoJust ext4 on my Linux things; I got scared away from btrfs because of some file loss horror stories
Possibly linux ( @possiblylinux127@lemmy.zip ) English2•8 months agoExt4 is prone to corruption as it doesn’t have much error detection. Whatever you do don’t lose power.
thingsiplay ( @thingsiplay@beehaw.org ) 8•8 months agoExt4 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.
Possibly linux ( @possiblylinux127@lemmy.zip ) English2•8 months agoI have had it get corrupted. This isn’t an issue on btrfs and zfs
thingsiplay ( @thingsiplay@beehaw.org ) 1•8 months agoI 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.
Possibly linux ( @possiblylinux127@lemmy.zip ) English1•8 months agoExt4 is a little fragile in my experience. It can get corrupted quickly when things go wrong. To be fair most hardware isn’t going to cause an issue and I have only had a issue a very small amount. However, when there is an issue fsck tends to fail as it has no way to check data integrity. The result is a completely broken system filled with corruption.
Btrfs and ZFS are superior as they check the data as it goes across. (Especially ZFS) That isn’t to say ext4 is bad as I just find it is hard to recover data from if things go very south. The benefit of ext4 is that is very simple. It doesn’t have support for subvolumes, datasets or anything like that but it does just work.
Tell me about those stories, maybe we can debunk or prevent them today.
anothermember ( @anothermember@lemmy.zip ) 9•8 months agoBtrfs for everything these days, subvolume snapshots have been game-changing for me for doing backups.
Could you please elaborate on doing backups with btrfs?
anothermember ( @anothermember@lemmy.zip ) 3•8 months agoSure, I pretty much use the method explained here for weekly backups: https://fedoramagazine.org/btrfs-snapshots-backup-incremental/
Dataprolet ( @dataprolet@lemmy.dbzer0.com ) English8•8 months agoBtrfs, but I’m curious about ZFS.
Me too.
lnxtx (xe/xem/xyr) ( @lnxtx@feddit.nl ) English1•8 months agoBtrfs’ grandperson.
It needs a time to fully understand all features and quirks. ryannathans ( @ryannathans@aussie.zone ) 2•8 months agoYet surprisingly simple and easy to use
Shimitar ( @Shimitar@feddit.it ) 7•8 months agoExt4 on every Linux device.
Ah i dont have any other kind of devices (android on mobile, but there I have no choices on fs)
Why not btrfs? Don’t know, been using what has kept working flawlessly for me for the last 20+ years, no need to replace ext4.