I want to install a Linux server in my house to be able to share documents and multi-media files between every devices here. The machine I have has 3 HDD slots, I need at least 3.5 TB of storage and I want my files to be safe in case of a disk failure.I'm currently investigating two options that are around the same price at the moment:Option 1: 3*2TB in RAID 5Option 2: 2*4TB in RAID 1, which saves an HDD slot that I can use for the OS.My first question is :Are there technical advantages to either optionwhat should I consider when choosing between them?And my second question is: in the case of Option 1, where should I install the system? Should I create a 50GB RAID volume replicated on all disks to hold the system, or should I locate it on one specific drive with no replication ? And what about the swap?
Building a network storage server, trade-offs of different RAID configurations?
linux;partition;raid;raid1;raid5
The trade-offs are:Option 2 (2xRAID1) is more reliable, presuming the disks are of equal reliability. Basically, we assume there is a N%/yr (or whatever time period) of an individual disk failing. If you have two disks, the chance of any one of them failing is greater. If you have three disks, the chance of any one of them is greater still. So the 3-disk RAID5 is more likely to experience a failure (of a single disk). Either array will survive a single-disk failure. After a single failure, the RAID5 still has more disks, so it's more likely to suffer a second failure. Though that depends as well on rebuild time, which is probably a bit better for the 2TB disks, though it depends on the speed of the disks as well. However, with the absence of hot spares, I expect rebuild time is actually dominated by the time it takes the admin to install a replacement disk.Option 1 (3xRAID5) will have better read performance for single files (due to striping). Probably worse write performance, but it depends. For multiple files, RAID1 can read from both disks.Option 2 (RAID1) has a simpler geometry (how the data is laid out on the disks). If for some reason you had to recover data from it without access the RAID software (this is more likely in the case of hardware RAIDe.g., if the controller breaks), it'd be easier.Normal management for both options should be the same. You'd typically use the same commands to replace failed drives, start and stop the array, etc.There is another option you didn't mention: 3xRAID1. You can put 3 disks in RAID1. This means even after losing a disk, you're still fully redundantso, e.g., a (previously) undetected bad sector doesn't mean data loss on rebuild. Writes may be a little slower (due to the additional mirror). Cost is the main downside.Another way to increase durability of the data is to have a cold spare (a drive sitting on a shelf somewhere, ready to be installed if one of the active drives fails). This means you aren't waiting several days for a replacement drive to arrive.There are also filesystem options, if those are supported (e.g., both ZFS and btrfs support mirroring data).As far as the operating system, I'd install it on the array unless that's impossible. E.g., on Linux x86-64, I'd have a separate /boot (or /boot/efi for EFI machines) array, which would be a small RAID1 across all disks. Once you have a kernel and initramfs loaded (acutally, once you have grub2 loaded), you can use the full selection of RAID levels, logical volumes, etc.Finally, remember that RAID is not a substitute for backups. For example, if a machine gets infected with ransomware, it'll encrypt and delete all your filesand the RAID software will faithfully replicate that destruction to as many disks as you give it. Same with accidental deletions, bugs causing filesystem corruption, etc. And it won't stop natural or man-made disasters from taking out the whole server.