What filesystem type do you all use? I'm thinking of reinstalling using XFS instead of EXT4...
Hey all,
I'm getting a new SSD and will re-install Arch on it. I'm currently using EXT4, but have been thinking about switching. Specifically, I'm looking at XFS (I won't touch Btrfs). According to the bcachefs developer:
ext4, which works - mostly - but is showing its age. The codebase terrifies most filesystem developers who have had to work on it, and heavy users still run into terrifying performance and data corruption bugs with frightening regularity. The general opinion of filesystem developers is that it's a miracle it works as well as it does, and ext4's best feature is its fsck (which does indeed work miracles).
XFS is supposed to be very clean and well put together.
xfs, which is reliable and robust but still fundamentally a classical design - it's designed around update in place, not copy on write (COW). As someone who's both read and written quite a bit of filesystem code, the xfs developers (and Dave Chinner in particular) routinely impress me with just how rigorous their code is - the quality of the xfs code is genuinely head and shoulders above any other upstream filesystem.
My questions about XFS are:
- I'm assuming I can use it with dm-crypt/LUKS just like EXT4, right?
- Does XFS do a filesystem check on startup like EXT4?
Is there any reason I shouldn't switch to XFS? What do you all use?
Thanks!
About this post
- Posted
- Archived
- Score
- 45 · 100% up
- Kind
- Text
- ID
- 60impq
51 comments
For desktop? Ext4 hands down.
It works. More battle-tested than all the other meme filesystems. Is equally as performant or more performant than all of them.
For file servers? ZFS.
It works, is battle-tested and has a great set of features.
Maybe something better will come, but I'll let the other people in this thread risk their data with it before considering it.
Ahem. XFS is only one year younger than Linux itself, and has far, far more "battle-testing" than any of the EXT* filesystems. It is the rock-solid choice for any operating system that supports it.
As a Linux FS it has received less battle-testing, by virtue of ext4 being the default almost everywhere. And that grows by a lot when considering desktop usage only.
I use ext4 because I am a simple woman.
Your comment reminded me of this: http://buttersafe.com/2008/10/23/the-detour/
I use ext4 because I'm completely unaware of a filesystem without flaws
Why the hate for btrfs? I've been running it on arch for years will zero issues
probably because it has a history of consuming your data, which is generally not a desired feature of a filesystem. once you lose their trust, it's hard to get it back for some folks.
So is this an issue today or an old issue that was fixed and people are still salty about it?
The main reason I don't use btrfs as a primary partition because it does not support encryption.
wat? Of course it does, dm-crypt works fine.
I was a little worried but I just setup a RAID0 on a test machine and it was so much simpler than mdadm. I may eat these words later but everything has been fine this far
in production i use xfs all the way, unless there is a good reason for something less fancy like ext4.
btrfs is what i play around on workstation.
In production I use ext4 all the way, because you can reserve a portion of space for root, and if you don't, non-root users can't log in when the disk is 100% full. Also, xfs really does not like getting to 100% full. Source: my devs use docker and fill up the disks all the time.
i think this is a very common feature on any fs.
i did not understand why we used xfs in production, but this fs scales well to millions of files, with no special consideration beforehand (just make a filesystem and it will adjust as file count grows) and supports online resize without need to unmount.
also xfsdump is an awesome utility for data backup/copy.
How about F2FS?
Anecdotally, I just switched from ext4 to F2FS on my phone (Nexus 6) and the difference in subjective speed is incredible. Interestingly, there is almost no difference in the benchmarks I ran, so I think the difference may be in something like how well it handles contention from multiple simultaneous operations.
I use btrfs. Any problems I have had were due to my own misunderstandings or errors.
While this is likely true, it's much easier to have misunderstandings or errors in btrfs.
Yes, you can use LVM, dm-crypt/LUKS, and yes it does do a brief self-check every mount, which could dive into a more thorough check with any indication of a problem. See: man xfs_check, man xfs_repair. XFS also has tools for dumping and restoring a filesystem both before and after a repair if it comes to that.
Look into a robust backup solution. (A fancy filesystem can't save you from floods and meteor strikes.) XFS will automatically freeze during LVM snapshots, so making backups is easy, and XFS is a popular filesystem for backup drives.
The only argument against XFS is that it's probably overkill. It's unlikely you will notice the overhead, but it is designed to operate in very large parallel systems.
Regarding your ext4 concerns; ext4 code-base is excellent. Admittedly, the source for the tools seem extremely dense to me (e2fsprogs), but I figure with all the concerns handled in that code over decades it became a bit obtuse. I consider the prevalence of corruption reports with ext4 has more to do with sample size and any power/interference/hardware/software related issues per case rather than filesystem or tool bugs.
Keep in mind I've used btrfs in production, in home, and in backups since late 2009, so you might not take any ideas from me. ;)
I don't think you'll notice any differences with normal used.
I use XFS on all my machines without issue.
Between ext4 and xfs I'd go ext4 all day every day unless I needed the scalability. The performance differential isn't compelling enough to offset the inability to shrink xfs volumes for me.
Removing the restriction between those two I'm using zfs for now and if that weren't an option or I'd be using btrfs. The snapshots are a dealbreaker feature for me these days. Bcachefs and hammer2 are also on my radar when/if they become viable options for day to day use.
Slightly tangential, but have you thought about Btrfs?
They do say
and the linked post does give some reasons why (though, I don't know enough about the developer or btrfs to judge them).
The poster said they won't touch BTRFS.
XFS is a good filesystem, feels snappy at least for me.
Downside is you cannot shrink partition size but probably not that common unless your constantly shrinking partitions to give other partitions more space.
Im 85% sure it does some form of xfs check on boot, not sure about encryption question
I've been using for home use without problems (other than dead HDDs) for a couple of years.
I wanted / and home/ partitions with separate snapshots and shared storage. The root snapshots especially were great in case of upgrade problems in Arch. I use NixOS now, so the / rollbacks aren't really neccessary, but it's still nice to be able to have multiple distros with or without a shared home/ on the same volume.
Beware that XFS is basically impossible to do "oops I didn't mean to delete that" data recovery. This is a small thing really, but very annoying when you only find it out just after deleting something important.
This is essentially true for any filesystem on a multi-user system. XFS is not particularly worse than ext*, btrfs, or any other common Unix-esque filesystem in that respect.
XFS encrypted on an SSD works just fine for me. I've been running this setup on my laptop for a couple of years now:
XFS will check a filesystem's integrity and replay the journal if necessary at mount time, rather than boot time. To quote
man fsck.xfs:This is exactly what I needed, thank you!
Ugh. There's been so much discussion about file systems on here recently and I just feel awful being currently locked into Windows.
Nobody is locked into windows. You have only yourself to blame.
University I attend has windows exclusive software necessary for participation. But you're right, I should totally jump ship and swap universities so I can run arch again.
Why not bcachefs? Kent claims it's pretty stable already.
bcachefs does not have a stable on-disk format yet. And it needs a modified Linux kernel.
I have been using ext4 on ssd, and am currently running arch as my main OS from nvme drive (512Gb 950pro) with ext4 on it. Have had no problems whatsoever. But I am probably not that advanced to experience problems ;).
I have two laptops, one use a botchered btrfs install without subvolumes, because idk. One has a propper btrfs setup. Used it for 3 years and works OK. My servers use ext4 tho.
I tried ZFS for a while but since im not using the lts kernel, kernel updates are often faster than the updates for the ZFS module which made my System unbootable a few times. i know there are ways of preventing this, like withholding kernel updates until the module is in the repositories, or just using the lts kernel, but i switched back to ext4 anyways. I also tried BTRFS a few years ago and lost a lot of data when i discovered that there weren't any tools to recover data from it at the time
I've had some very good experience running xfs on a VM (it seems to perform a bit better than ext4 here), but I haven't used it encrypted.
Dm-crypt wraps the block device, not the filesystem, so it should work with any* filesystem that your kernel can handle.
^*weird ^setups ^may ^require ^more ^boot ^setup, ^depending ^on ^how ^early ^they ^need ^to ^mount
Mostly ext4, sometimes jfs for data partitions.
I use EXT4 because restoring from snapshot when I break something is the way of the coward.
I use xfs and have since umm 2002 or so .
We use xfs in 100% of our servers along with ceph as required. The only non-windows place we didn't use it was our NFS servers because they were NetApp, but they recently got the boot.