Why I Do Use ZFS as a File System for My NAS

Thu 29 January 2015 Category: ZFS

On February 2011, I posted an article about my motivations why I did not use ZFS as a file system for my 18 TB NAS.

You have to understand that at the time, I believe the arguments in the article were relevant, but much has changed since then, and I do believe this article is not relevant anymore.

My stance on ZFS is in the context of a home NAS build.

I really recommend giving ZFS a serious consideration if you are building your own NAS. It's probably the best file system you can use if you care about data integrity.

ZFS may only be available for non-Windows operating systems, but there are quite a few easy-to-use NAS distros available that turn your hardware into a full-featured home NAS box, that can be managed through your web browser. A few examples:

I also want to add this: I don't think it's wrong or particular risky if you - as a home NAS builder - would decide not to use ZFS and select a 'legacy' solution if that better suits your needs. I think that proponents of ZFS often overstate the risks ZFS mitigates a bit, maybe to promote ZFS. I do think those risks are relevant but it all depends on your circumstances. So you decide.

May 2016: I have also written a separate article on how I feel about using ZFS for DIY home NAS builds.

Arstechnica article about FreeNAS vs NAS4free.

If you are quite familiar with FreeBSD or Linux, I do recommend this ZFS how-to article from Arstechnica. It offers a very nice introduction to ZFS and explains terms like 'pool' and 'vdev'.

If you are planning on using ZFS for your own home NAS, I would recommend reading the following articles:

My historical reasons for not using ZFS at the time

When I started with my 18 TB NAS in 2009, there was no such thing as ZFS for Linux. ZFS was only available in a stable version for Open Solaris. We all know what happened to Open Solaris (it's gone).

So you might ask: "Why not use ZFS on FreeBSD then?". Good question, but it was bad timing:

The FreeBSD implementation of ZFS became only stable [sic] in January 2010, 6 months after I build my NAS (summer 2009). So FreeBSD was not an option at that time.

One of the other objections against ZFS is the fact that you cannot expand your storage by adding single drives and growing the array as your data set grows.

A ZFS pool consists of one or more VDEVs. A VDEV is a traditional RAID-array. You expand storage capacity by expanding the ZFS pool, not the VDEVS. You cannot expand the VDEV itself. You can only add VDEVS to a pool.

So ZFS either forces you to invest in storage you don't need upfront, or it forces you invest later on because you may waste quite a few extra drives on parity. For example, if you start with a 6-drive RAID6 (RAIDZ) configuration, you will probably expand with another 6 drives. So the pool has 4 parity drives on 12 total drives (33% loss). Investing upfront in 10 drives instead of 6 would have been more efficient because you only lose 2 drives out of 10 to parity (20% loss).

So at the time, I found it reasonable to stick with what I knew: Linux & MDADM.

But my new 71 TiB NAS is based on ZFS.

I wrote an article about my worry that ZFS may die with FreeBSD as it sole backing, but fortunately, I've been proven very, very wrong.

ZFS is now supported on FreeBSD and Linux. Despite some licencing issues that prevent ZFS from being integrated in the Linux kernel itself, it can still be used as a regular kernel module and it works perfectly.

There is even an open-source ZFS consortium that brings together all the developers for the different operating systems supporting ZFS.

ZFS is here to stay for a very long time.

Comments