1

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 5
  • Option 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 option—what 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?

  • always realize purpose of RAID is to keep you running and online in case of disk failure, this is completely independent of data corruption and deletion. you said you need at least 3.5 tb storage, option #3 which is NOT RAID is one 6tb hd as data, second 6tb as backup, you configure a copy scheme to happen daily to back up your data. because this is personal use, i'm sure you can afford 10min to 1 hour downtime should the data disk fail and you don't "require" RAID. – ron Jun 7 '17 at 16:36
  • RAID in a home use setting often introduces more complexity than benefit. With 4tb and 6tb hard drive prices being acceptable these days that is a better way, unless you already have numerous 80gb disks you want to use which then you could RAID and group together to provide a 1+ Tb /data volume. – ron Jun 7 '17 at 16:41
1

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 RAID—e.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 redundant—so, 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 files—and 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.

  • Thanks for your thorough answer. About backups, you forgot the «my house burnt» and the «my kids just fell on my server» as a cause of failure RAID cannot mitigate. But I'll deal with the backup only for a subset of files (mainly docs and pictures since I don't think movies and TV shows deserve it ;) – StyMaar Jun 7 '17 at 0:06
  • @StyMaar I've updated my answer to note an additional advantage of RAID1 and also about having a cold spare. Also: yep, plenty of disasters that can take out the whole server. I'd suggest too that you keep it out of the way of the kids falling—mainly for the kids' protection! I suspect the steel of a server case will do more damage to the kids than vice versa. – derobert Jun 7 '17 at 16:17
0

I'd reco that you don't get greedy and use RAID 1. It should also give you more options when you want to grow your filesystem.

Instead of using a single drive as an OS drive, also put the OS on your raid volume?

Perhaps an option 3, 3-way mirror? no pun intended. ;o)

How are you planning on doing the RAID? HW or SW?

  • Thanks for your answer. I'm gonna use SW RAID since this is a personal gadget and I don't have much budget for it. Same answer on why I won't use a 3-way mirror RAID 1 since it trades money in exchange for availability (which isn't really important in my use-case), or am I missing something ? – StyMaar Jun 7 '17 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.