Does it make sense to create a zpool with lots of mirror vdevs?
To prefix, I am rather new to ZFS. My goal is to create an internal NAS system, with minimal chance of losing all my data.
I've currently acquired four 4TB disks, and I plan to run them in a single zpool with two mirrored vdevs, like so:
pool: data
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
<disk 0> ONLINE 0 0 0
<disk 1> ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
<disk 2> ONLINE 0 0 0
<disk 3> ONLINE 0 0 0
When extending the zpool later with more disks, would it make sense to just keep adding mirror-2
, mirror-3
with two paired disks each?
Using multiple mirror vdevs is not an issue for zfs - at all. They provide much higher performance than raidz vdevs and faster resilver. An all-mirrors pool is easier to extend and, with recent zfs versions, even to shrink (ie: vdev removal is supported).
raidz has better space efficiency and, in its raidz2 and raidz3 versions, better resiliency. A raidz pool can be extended with at least 3 disks at time - leading to a new raidz1 vdev. However, such a configuration is not ideal: with big disks you should always used raidz2. This means that expanding a raidz2 vdev requires 4 disks, with no better space efficiency compared to mirrors (ie: 50%), but somewhat better resiliency (any two disks can fail without data loss).
All things considered, when needing good random IO performance I always use mirrors. I only use raidz2 when space efficiency is a bigger concern, and only with reasonably wide stripe (6+ disks).
As you plan to only use 4 disks and to expand later, I suggest you to use plain mirrors.
Depends on. What you are showing is in fact a raid 10. So yeah - you can continue to grow it with more mirror vdevs. Although you should really consider using raidz, because raid10 is merely a waste of disks.