I recently got a few (5) hard drives to turn my home server into a NAS with trueNAS scale and my idea is to have 4 usable and 1 for redundancy, my question is… How does RAID work, like what is RAID 0, RAID 5, software RAID etc, and does any of that even matter for my use case?
If you’re using TrueNAS it already has some types of RAID it wants to do. Assuming your 5 drives are the same size what you want is called RAIDz1 (1 standing for one drive worth of redundancy).
It is a type of RAID5, which means instead of having 5x usable storage you reserve 1x for redundancy information spread out across the 5, and get only 4x usable space.
Since you’re a beginner you get the usual lecture: RAID is not backup. RAID allows a certain number of your drives to fail without losing any data; it spreads the risk of hardware failure.
RAID won’t help if you delete a file or accidentally explicitly format the wrong drive or even the whole array, and won’t help if the PC is stolen or struck by lightning or burns in a fire.
The solution used by TrueNAS (ZFS) has something called snapshots that can help with modified or deleted files.
For anything else you have to consider which of your files are “my world has ended”-level of important and backup to a HDD in a drawer, or to Blu Ray discs, or online to the cloud.
To add, unlike “traditional” RAID, ZFS is also a volume manager and can have an arbitrary number of dynamic “partitions” sharing the same storage pool (literally called a “pool” in zfs). It also uses checksumming to determine if data has been corrupted. On redundant setups it will then quietly repair the corrupted parts with the redundant information while reading.