When setting up an Unraid system and adding your first drives, you will notice that you can choose between a few different filesystems. Namely, there is ReiserFS, XFS, and Btrfs. But which filesystem is best for Unraid? This article will explain why there are three different options and which one is best for what job. Without going into the details, ReiserFS is a definite no-go for any new Unraid systems, but XFS and Btrfs both have their advantages, making them more suitable for specific situations.
A filesystem (shortened to fs, maybe now the names make more sense), such as ReiserFS, XFS, or Btrfs on Unraid, controls how data is stored and retrieved from your drives. It isolates and identifies the data on your drives. A group of data is what makes up a file, just as multiple pieces of paper are grouped into a physical file. A single piece of paper without any context would be useless, but the file ties everything together. Without a filesystem, your Unraid NAS would be lost. Data stored on drives would just be one large body of data, and Unraid would have no way of telling where one file starts and ends.
Don’t use ReiserFS in Unraid
The ReiserFS filesystem is only supported by Unraid for legacy reasons and for those migrating from an earlier version. Do not ever use the ReiserFS filesystem when setting up a new Unraid system as support for it has been deprecated. There are many reasons as to why Unraid moved away from ReiserFS. For starters, it has a hard limit of 16 TB and newer hard drives now reach and exceed that limit. Then there’s the fact that in some cases, write performance degrades as the file system starts getting full.
The only advantage ReiserFS still has over the other filesystems mentioned in this article is that it is excellent at recovering from even extreme levels of file system corruption. Despite that, there is one more significant reason for not ever using ReiserFS as your Unraid filesystem.
ReiserFS was initially developed by Hans Reiser, who is currently serving a prison sentence of 15 years to life for brutally murdering his wife. Obviously, that made developers quite uncomfortable in using ReiserFS and combined with the performance issues mentioned earlier, it has led to only minimal involvement from Linux kernel developers. There is a chance of an updated Linux kernel, which is what Unraid uses, causing problems with ReiserFS from which XFS and Btrfs should be protected from, as long as their development is continuing.
Converting from ReiserFS to XFS
If you are using the ReiserFS filesystem in Unraid, it is time you converted it to XFS or Btrfs. There are ways of doing it and while it might take up some time, the conversion will be worth it eventually. Make sure you follow the instructions to a T, as an error could lead to irretrievable data loss. As always, if you encounter any issues, the Unraid forum members are willing to help as best they can.
Use XFS for array drives
XFS is the filesystem Unraid suggests you use for your array drives (hard drives) during the setup. Unraid doesn’t suggest XFS without rhyme or reason. It is a commonly used Linux journaling file system, being first introduced by Silicon Graphics in 1994. Due to its age, the XFS filesystem is robust and well-supported by Linux.
Drives up to ~9.2 EB which equates to 9200000 TB are theoretically supported. I think it’s fair to say that we won’t reach the upper limit in our lifetime. Adding to that, XFS is capable of storing 264 (18,446,744,073,709,551,616) files. Even future generations will be pressed hard to come anywhere near to that number.
Compared to Btrfs, XFS is better at recovering file system corruption, which can happen after unclean shutdowns or system crashed. While you might be careful to always correctly and cleanly shut down your Unraid system, blackouts and defective components are always a risk to anyone and will immediately shut off the power to the system (unless you have a UPS).
Use Btrfs for cache pools
Btrfs (commonly pronounced as “butter fuss” or “butter F S”) is a newer and more feature-rich filesystem. It is actively being developed by Facebook, Intel, the Linux Foundation, the Oracle Corporation, Red Hat, among others. As a newer filesystem, Btrfs is not considered to be quite as stable as the older XFS. However, many Unraid users have reported that it seems to be just as robust as XFS.
What makes Btrfs the perfect system for cache pools is the fact that it supports various levels of RAID in multi-drive mode. Btrfs is the only option if you want to use multiple drives in your Unraid cache pool. This is relevant for your Unraid system as it allows you to configure cache pools as RAID 1 for data mirroring or RAID 0 for speed. Other RAID levels with various advantages and disadvantages are also available. Other advantages of Btrfs in Unraid are that it detects bit-rot (file content corruption) by using checksumming techniques.
All in all, Btrfs should be stable enough to be used not only as your cache pool’s filesystem, but also that of your array drives. If you’re willing to live with the possibility of your Unraid system being slightly unstable now and again, you’re free to give it a go, but I cannot guarantee that everything will work out.
Tl;dr: The best filesystem for Unraid
Use XFS for your array drives and Btrfs for your cache pool. You might also want to consider Btrfs for your array drives, but you should be aware of the potential risks. Never use ReiserFS on a new system and if you are currently using it, consider converting it to XFS or Btrfs.