I have a server with 4x U.2 drives, each one is 7.68TB enterprise SSDs from Samsung.
Should I do a traditional RAID10 or RAID5 (if possible) to use with my LXD containers or should I use ZFS and do the RAID using ZFS? if the latter option, which options should I use to create my ZFS pool for this setup for maximum redundancy and speed? Main focus is the redundancy, if one or two disks fail, I’d like to be able to recover them by simply replacing the disks without loosing any data and possibly any downtime either.
If you go with ZFS, I suggest using it’s RAID capabilities.
You could create two 2-disk mirrors that ZFS striped. This gives you essentially RAID10 but with the additional benefit of filesystem awareness. With this, you can tolerate one disk dying and possibly a second as long as it it not the one that mirror the first dead disk, see https://superuser.com/questions/1037605/how-many-drives-can-i-safely-lose-in-a-raid-10-array
If you go with RAID5 (or RAIDZ in ZFS), losing one disk means you are still operational but have no more redundancy.
If you absolutely need to survive the loss of any two disks, you have various options:
- 3-disk mirror with 1 standby
- 4-disk mirror
Possibly more I couldn’t think of but hopefully that will get you started!
How can I do the RAID10 setup if I want to go with that option? Does doing RAID10 in ZFS also give 2X speed benefits as in traditional RAID along with redundancy?
To create, that’d be something like:
zpool create POOL_NAME mirror Samsung-disk-1 Samsung-disk-2 mirror Samsung-disk-3 Samsung-disk-4
But I definitely suggests researching the topic (man pages, search the Internet) because there is a lot you can tune and depending on what you intend to store and how you will be accessing it. If you go with a RAID10 equivalent, you can probably reclaim some of the lost space by enabling compression (here again, many choices)…
As for the speed benefits, I believe that is somewhat similar to traditional RAID10 but you’d need to do some benchmarks.