tldr: I’m going to set up raid z2 with 4x8TB hard drives. I’ll have photos, documents (text, pdf, etc.), movies/tv shows, and music on the pool. Are the below commands good enough? Anything extra you think I should add?
sudo zpool create mypool raidz2 -o ashift=12 /dev/disk/by-id/12345 ...
zfs set compression=lz4 mypool #maybe zstd?
zpool set autoexpand=on mypool
zpool set autoreplace=on mypool #I might keep this off. I can see myself forgetting in the future
zpool set listsnapshots=on mypool
With ai raising hard drive prices, I over spent on 3x10TB drives in order to reorganize my current pool and have 3 hard drives sitting on a shelf in the event of a failure. My current pool was built over time but it currently consists of 4x8TB drives. They are a mirrored stripe so a usable 16TB. If I understand it correctly, I can lose 1 drive for sure without losing data and maybe a second drive depending on which drive fails. Because of that, I want to move to raid z2 to ensure I can lose 2 drives without data loss. I’m going to move data from my 4x8TB drives, to the 3x10TB, reconfigure the 4x8TB, and move everything back. I run Immich, plex/jellyfin, and navidrome off the pool. All other documents are basically there for long term storage just in case. What options should I use for raid z2 when setting it up?
I know I can look this stuff up. I have been and continue to do so, I was just hoping for some advise from people that are more knowledgeable about this than me. The move from the 4x8TB drives to the 3x10TB is going to take ~3 days so I really don’t want to mess this up and have to start over 😅
Edit:
After looking up each property, this is the command I will probably end up using to create the raid z2 pool, thanks Avid Amoeba:
sudo zpool create \
-o ashift=12 -o acltype=posixacl -o xattr=sa \
-o compression=lz4 -o dnodesize=auto -o relatime=on \
-o normalization=formD \
raidz2 \
mypool \
/dev/disk/by-id/12345 ...


I’m sure you already know this, but do note that with Z2 compared to mirrors, you should expect a decrease in performance and an increase in rebuild times in the event of a drive failure. Not saying don’t do it, but make sure the perceived benefits are worth the trade offs.
Here’s some more info on the topic: https://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs-not-raidz/.
That’s still true, but performance has changed a lot since Jim Salter wrote that. There was a time When 2x mirrored vdevs (the equivalent to raid 10) would have been preferable to raidz2, but performance of both ZFS and disks themselves has improved enough that there wouldn’t be much of a difference in performance between these two in a home lab.
Personally, I agree with you in that mirrors are preferable, mostly because I don’t really need high availability as much as I want an easier time restoring if a disk fails.