Use XFS or ZFS as file system?

Hello everyone, would need to reinstall cachyOS in the near future.
Now the question arises with which file system.
ZFS, XFS, BTRFS or ext4
ZFS and XFS sound very interesting in terms of features.
Do I need to consider anything when using them? How do these systems behave on an SSD? How can I create snapahots and restore them if necessary?
Do you have any experience you can share ?

Hallo zusammen, müsste in nächster Zeit cachyOS neu installieren.

Jetzt stellt sich mir die Frage mit welchem Dateisystem.

ZFS, XFS, BTRFS oder ext4

ZFS und XFS hören sich von den Features sehr interessant an.

Muss ich bei der Verwendung etwas beachten ? Wie verhalten sich diese Systeme auf einer SSD ? Wie kann ich Snapahots erstellen und diese bei Bedarf wiederherzustellen ?

Habt ihr da Erfahrungen die ihr teilen könnt ?,

EXT4 if you just want a simple file system
XFS I would recommend if you need a simple high performance file system if you care about that
BTRFS If you want raid,compression,snapshots etc
ZFS If you need its advanced features like pool,arc
You can view this Filesystems | CachyOS aswell

1 Like

I’ve never personally used any of them, but I’ve heard that XFS tends to corrupt data when there are sudden power outages. ZFS is also an out-of-tree filesystem that I wouldn’t want to go into that. However, all of them are good filesystems in their own right and have their own pros and cons so you can’t go wrong with any of them.

Ext4 Simple use and forget about it. Performance is good.

Xfs performance good but old perhaps not suited to ssd?

Btrfs- snapshots, add drives on the fly, cow filesystem. Performs well, trusted by enterprise. Modern

Zfs- feature set like btrfs, but uses more ram. Out of tree, in cachyos no problem but elsewhere this is a pita.

Btrfs is the default in cachyos installer for good reason imo.

Use whatever try them all.

BTRFS is the fastest filesystem for normal desktop use vs ext4/XFS, thanks to compression. Read which file system to use for daily work? for the benchmarks.

It’s also the most feature complete (as ZFS isn’t properly integrated in Linux, although cachyos is one of the rare distros to do a lot of work to integrate it, you will face problems if you decide to move your drives to other distros, depending on the kernel versions, etc…).

You would prefer to use XFS only in very specific cases, where you are only working with incompressible data (i.ex: using a dedicated partition for video editing).

To note: the information in this link regarding the fragmentation cons with BTRFS is wrong (@ptr1337, @naim):

  1. There is NO FRAGMENTATION PROBLEM with BTRS if you mount it with the autodefrag mount flag: “automatic defragmentation” (I have been doing this for 13 years on all of my systems including my large storage pool servers with many disks regularly full to the brink) → 0 fragmentation problems.
  2. Even more so: afaik, BTRFS is the only filesystem on Linux that does not have a fragmentation problem, thanks to autodefrag (-> no other filesystem has this).
  3. (keep in mind that autodefrag should only be enabled on hard drives, as fragmentation speed problems don’t concern SSDs)

Exactly. :+1:

I had a corrupted file system with xfs. Since then they have released a tool that could have fixed my issue, but I still wouldn’t recommend xfs for general use.

Use BTRFS so you can use snapper without wasting disk space, and ZFS if you are going to make a Media Computer with RAID backup. XFS is fast but kinda old, and ext4 isn’t really more stable than BTRFS anymore.

The one ext4 use I can think of over BTRFS, if you are gonna have Windows on the same computer, I feel Windows plays a bit nicer with ext4 compared to BTRFS.

Hi,

Wenn du nur eine SSD verwendest und Features von ZFS nicht benötigst würde ich eher zu btrfs raten.

Ich stelle mir gerade die gleiche Frage. Ich persönlich verwende aktuell BTRFS als root/system Partition und ZFS für meine Daten. Allerdings baue ich mir den Kernel (Vanilla) + ZFS immer selber.

Aktuell bin ich aber noch auf Arch Linux unterwegs. Der Rechner ist jetzt 9 Jahre alt und kommende Woche bekomme ich die Teile für meine neue Kiste. Eventuell wechsle ich zu CachyOS.

Ich würde gerne mein Betriebssystem auch auf einem ZFS Pool laufen lassen. Mein Plan wäre 2 oder mehr SSDs als ein zpool. Dann mit zrepl das ganze auf meine Festplatten sichern (seperater zpool)

Aktuell habe ich einen Router/Server mit Debian auf ZFS. Der sichert sich und ein paar Container in der Nacht auf meine Workstation. Einen zweiten Server hab ich auch mit Debian und ZFS (darauf Container und VMs, Windows Linux … .) der sichert auch alles mit zrepl auf meine Workstation.

I use BTRFS and not issues, and it is very useful to have snapshots available, in case of any problem.

I have a large desktop system (2xnvme drives) and 6 SSD drives. I am retired and I write software as a hobby.
My very best experience thus far, is with btrfs. I did use the zfs file system via ubuntu, and found it to be too resource consumptive. (To really benefit from zfs, you need at least a 16 gig ram system. You will find that zfs itself requires quite a bit of ram.

btrfs, has proven to be an excellent interface. It has saved me many times, when I rebooted the system without first shutting down open files. btrfs is reliable and fast. It has COW which means, your file is protected from corruption. Your updates go to separate blocks, with a memory of where they are. When you intentionally close your file, the pointers to the updated blocks are popped into place, and the blocks that were right prior to your update are set aside.

There are numerous YouTube videos about btrfs. “CJ Ware” just did a pretty in-depth presentation of btrfs. Some time back (about 1 year ago), he also did a review of zfs.

XFS is OK, in that ReadWrite I/O is fast, at 3-4 times faster than zfs. And about 2x faster than btrfs. But recovery is done through journaling. I would use it for /home, but not for /

I switched to using btrfs some 3 years ago, and with btrfs, I have never lost any data. When I had a power-failure and lost the system, on power restore and reboot, all my data was there intact to what it was before I began my edits.

My summary. I use CachyOS with btrfs.

Grandpa Leslie – 65 years in IT.

1 Like