I am a bit new to ZFS but I am bringing up a new storage pool with 12 physical drives.
My current plan is to have RAIDZ2 across 10 drives and two hot spares.
But I wonder if I would not be better off with RAIDZ3 across all 12 drives and no hot spares.
The reasoning is that hot spares are basically powered-up, idle drives. It may be months or years before they are called into service and at that time I might find out that they were not viable. If they were part of a RAID stripe I could at least get feedback as to whether they were good or not.
I haven't seen much discussion of this on the web. Does anyone have advice?
Best Answer
About hot spares
Hot spares are set to a specific pool, but can be attached to any vdev of the pool automatically in case of failures. If you only have a single vdev consisting of all your disks, you are better off directly incorporating the disks (except if you already have RAIDZ3 and still disks to spare).
Additionally, resilvering takes time and occurs in a vulnerable (RAIDZ1, 2-way mirrors) or performance-reduced state (RAIDZ2, RAIDZ3, 3-way mirrors), which would not have occurred if you had already attached the device to the vdev.
Basically hot spares are a thing for large arrays. If you have 27 disks split into 3 vdevs of 9 disks in RAIDZ3, you can add 3 hot spares to reduce the "It's 2 AM and 3 disks have crashed, now I have to get up and fix this mess" moments (assuming a 32 drive bay system). Smaller systems usually don't have enough disks to even get to the "2+ vdevs and Z2/Z3" situation. An exception would be mirrors (e. g. 6 x 2), where crashes are much closer to being fatal for the pool (and you don't have enough disks to make them 6 x 3).
Optimal pool layout
Some advice from Nex7's blog regarding pool layout:
This means in your case you would have the following options:
I would rank them (descending) as:
I would not use RAIDZ1 regardless of size, because you might want to later replace them with larger disks and then the problems will show (meaning you would not wnat to upgrade this way and might not be able to grow the storage space without adding additional disks).