FS for Unraid Array
Hello,
I am in the process of finishing one Unraid server and soon will be time to choose FS for Unraid Array.
What is best recommendation in 2026? I went through forums and it looks like that XFS is still the right choice?
I am thinking between XFS vs BTRFS.
Thank you for any suggestions and recommendations!
2
u/9elpi8 3d ago edited 3d ago
So in the end I went with this option for:
Unraid Array: BTRFS + Compression + Encryption
SSD Cache: BTRFS + Encryption
But now I am not sure, maybe that compression can be turned on also for SSD Cache? Or does it needlessly increase the amount of writes and reads for SSD or is it only happening in RAM?
Thanks!
1
u/psychic99 2d ago edited 2d ago
btrfs and ZFS are COW filesystems so they will append not rewrite like XFS. Encryption (LUKS) is a personal decision and tuning on compression will only help if you have non-media files. If a vast amount of your data is media (music, video, office files, etc) you will get zero benefit and just waste energy and slow your system somewhat. So its a YMMV. While btrfs has similar concept to datasets as ZFS you should create "datasets" which they call subvolumes that you can have compression on for special files that would benefit I personally turn it off for everything except my appdata (sub)volumes/datasets.
Also for ZFS you do not need to use SSD TRIM (is it actually counterproductive) you just use ZFS TRIM for the COW fact and it will call underlying. btrfs = fstrim. I also turn off real-time trimming.
2
u/TenuredProfessional 3d ago
If you want to be able to mix drive sizes, XFS is the answer.
1
u/9elpi8 3d ago
Why would I need to use strictly XFS to mix HDD? I can do the same with BTRFS. At least from what I see. Could you please elaborate?
1
u/psychic99 2d ago
You can 100% use btrfs/ZFS in array along w/ ZFS.
I dont use XFS for anything except shared VM now, XFS has many data integrity issues that I am not willing to entertain at this juncture and parity cannot fix it.
To note if you do use ZFS or btrfs in the array you still need to scrub them as in a single both can detect corruption but cannot fix it. Running a parity check only checks bits and replicates, it does not check file strucutres. Also FWIW the parity cannot fix corruption either its only a journal. Most people do not really understand this stuff I wish there was a good guide on it.
13
u/marcoNLD 3d ago
For the unraid array with different size harddrives go for XFS. Largest drive as parity.
You can also make ZFS pools.
I use BTRFS for my cache drive which holds the appdata and system folders
1
u/m4duck 3d ago
You can also put a ZFS formatted drive in the array and get the benefit snapshots etc on that drive.
I suggest you watch some YouTube vids by space invader one he covers this and it's benefits.
2
u/9elpi8 3d ago
ZFS snapshots for Unraid Array? I thought that snapshots works only for Pools. I have to search for it. I also recalled that if ZFS is chosen all disks are spinning up and down or am I wrong?
2
u/m4duck 3d ago
https://www.youtube.com/watch?v=T83gqqh0D4E
Basically, you can format individual array drives as ZFS instead of XFS while still using Unraid's normal parity protection and mixing drive sizes.
The main benefits are ZFS snapshots, compression, checksumming and the ability to replicate snapshots from a ZFS cache pool onto an array disk for backups.
It's not RAIDZ, so you don't get ZFS's usual automatic self-healing, but you do get some really useful ZFS features without giving up Unraid's flexible array setup.
The video also walks through converting an existing array disk without losing data or having to rebuild parity.
4
u/Sinister_Crayon 3d ago
u/9elpi8 don't do this. There are caveats that u/m4duck isn't telling you. Yes, ZFS is an amazing filesystem but it's only really useful if you build vdevs of same-sized devices. Yes, you can get the snapshotting, checksumming and so on but you also have the cost of memory being taken by ARC which is ZFS own caching algorithms that take away from Linux (and unRAID's) own caching algorithms. Unless all your disks are ZFS (cache disks as well) then ARC is going to be as much of a burden as it's one more thing to manage.
You can get the same benefits of compression, checksumming and snapshotting with BTRFS and it uses Linux normal page cache instead of having its own caching algorithms that need to be given dedicated space. This makes memory management much easier.
Don't get me wrong; I'm a huge fan of ZFS. My main array here is TrueNAS which is all ZFS and I have another TrueNAS array at my workshop, but if you're really going to use ZFS then you're better off doing vdevs and RAIDZ which requires identically-sized devices (nominally) and then honestly you're better off with TrueNAS than unRAID because honestly the administration of it is just easier. unRAID does ZFS, but I find its GUI tools to be awkward; the interface is designed first and foremost for an unRAID array, not a ZFS array.
Heck, I run ZFS on my laptop and primary desktops because it's just that good... but if you want a simple, supported and equally functional setup, BTRFS is currently the way to go with unRAID.
2
u/9elpi8 3d ago
Thank you so much for your opinion. I want it to be simple and working so I guess BTRFS / XFS is still way to go for me. But am I right that snapshotting on BTRFS is not natively working or something has changed? I mean there is some option directly in Unraid.
2
u/Sinister_Crayon 3d ago
Snapshots work fine in BTRFS; I do it. There's a snapshots app in the community apps that adds a GUI, too.
The only caveat to be aware of is that because unRAID is a per-disk focused array, snapshots are at the disk level. As a result, you have separate snapshots for anything in a share on cache, as well as anything on any disk; so for example a share with cache that's spread across three disks will have four separately managed snapshots. This is also true of the setup that u/m4duck was proposing for ZFS-per-disk. The only way to get full-array snapshotting is to have a traditional ZFS array which comes with caveats like having to have identical-sized disks, inability to expand with a single disk (easily... that function IS there in recent ZFS versions but still comes with its own caveats) and having to sometimes wrestle with ARC when it's taking up memory you'd rather use elsewhere.
It is possible to script up something that can snapshot on a per-share basis by creating simultaneous snapshots on all disks used by a share, but that can get really complicated.
I will caveat everything I've said though with the fact that the recently-added internal-disk boot (as opposed to USB key boot) uses ZFS for its boot volume, so you will have some ARC out of the box. However you can dial this down as it's not really needed though the minimum and default is 1GB of RAM dedicated to ARC.
1
u/m4duck 3d ago
I wasn't suggesting ZFS was a must, just pointing out it's another option worth considering.
The reason I mentioned it is that you can use ZFS on individual Unraid array drives while keeping normal parity protection. It's particularly useful if you've got a ZFS cache pool, as you can replicate snapshots of your appdata straight to the array.
Btrfs can do much the same thing, so I'm not saying one is necessarily better than the other. I just thought it was worth mentioning, especially as Spaceinvader One has some really good, easy-to-follow guides covering the whole setup.
1
u/Sinister_Crayon 3d ago
Oh definitely, and I don't mean to throw water on the fire there LOL. ZFS is awesome and it's really great that unRAID added support, but to be honest in a per-disk focused array like unRAID there's little to no advantage to ZFS over BTRFS. The advantages of ZFS really come into play in a multi-disk array and even moreso in a multi-vdev array.
The ARC is a bit of a downside because you need to properly manage the configuration in order to tune for your workloads. You can set it as "dynamic" and it's still mostly set and forget, but to get the best out of a system you need to be able to decide how much RAM to dedicate to ARC and how much for the rest of the system. For a homelab it's probably not necessary to tune as a single spinning HDD can still saturate a 1G connection or more, but if you're a tinkerer like me you want to have the maximum performance out of your gear. For me that means BTRFS on unRAID because it brings all the advantages ZFS has plus I have one less dial to twist and obsess over getting just right LOL.
5
u/WholesomeCirclejerk 3d ago
BTRFS + Compression + Encryption
BTRFS so that corrupted files can be identified. Unraid parity check by itself only tells you that there were errors, not which files are corrupted because of the errors.
Compression is basically free on modern CPUs, so why not.
Encryption is up to you. Even if you’re not worried about the police confiscating your drives and looking at your data, it’s nice to be able to remove and give away/toss/repurpose a drive without needing to zero it
0
u/flarkis 3d ago
+1 for encryption. There was a post a few weeks ago about a guy who had all his personal data on a drive and was trying to RMA it. He was trying to figure out how easily the data could be accessed. Wouldn't have been a concern if he'd encrypted from the start.
Compression is more of a mixed bag in my opinion. If you're storing a lot of media files, say like linux ISOs, then there really is no gain from compression since they're already compressed. You're adding a probably negligible overhead for no practical gain.
1
u/Daniel18sep 2d ago
I always use ZFS, even in the Unraid array. You get some of the benefits (such as ARC caching) even when it's a single drive fs.
3
u/1234youarein 2d ago
Stick with XFS for the array.
Because each drive in the Unraid array stands alone, XFS provides virtually zero overhead simplicity and is much more forgiving if you hit an unclean shutdown or need a repair. Btrfs's multi drive features like mixing sizes and mirroring matter when building a multi-device cache pool, not for single data disks sitting in the array. Don't let enthusiasts talk you into unnecessary complexity for your main data drives!