ZFS Pool Configuration for a Home NAS
I recently setup a home NAS where the storage filesystem is ZFS. Like most home users, I don’t have a server with 10+ drive bays and a large budget for storage. I only have 4 drive bays and want to minimize the cost per TB of storage while being resilient to one drive failure.
Given the constraint of only having 4 drive bays and wanting to be resilient to at least one disk failure, there are only two possible ZFS configurations available, mirror vdevs or RADIDz vdevs.
Mirror vdevs offer flexibility as I do not need all four drives to start and instead can expand the pool one mirror vdev at a time. For example I could start with only two 4TB drives and mirror the data between them.
Later I could create a second mirror with two more 4TB drives vdev and add it to the pool. This would end up with about 8TB of usable storage.
Although each pair can survive the loss of a drive, the resulting pool can only survive the loss of a single drive. The loss of both drives from a mirror would result in data loss. Compared to RAIDz vdevs this has the higher cost per TB as the total usable storage is 50% of the raw capacity of the drives.
The other configuration available is using a RADIz vdev. A RAIDz vdev requires a minimum of three drives, and since RAIDz vdevs are not expandable 1 all of the drives are required upfront. In exchange there is more usable storage compared to using mirror vdevs, about 75% of the raw capacity. If I were to get four 4TB drives, I would end up with about 12TB of usable storage.
Considering the storage penalty using mirror vdevs have, I chose a RAIDz configuration. I think this makes sense for most home users because of the increased usable storage.
Not expandable as of the time of writing although a future release of OpenZFS might change that.↩︎