0

I'm installing a server machine (intended to run Debian GNU/Linux) which, among other things, is to be used for backups of our code. Now, I don't need all of the contents of the HDD to be error-resilient - the server's root filesystem, the daemons' logs, etc - may become corrupt just fine. But if I put them on just one HDD, I lose symmetry, which I am guessing might be detrimental to RAID performance.

I'll also note that this server is not mission-critical, in the sense that it's tolerable-but-annoying if it fails. Only the data integrity is critical.

Anyway, I have 3 HDDs, 1 Terabyte each. I could give more info, but - based on what I described, how would you partition the HDDs? Which RAID level would you choose, and on what disks? Which LVM configuration would you choose?

Edit: It turns out I have a hardware RAID controller. Would this change my preferences?

2
  • 1
    Be more specific about what OS you are running as it affects your options.
    – longneck
    Feb 6, 2014 at 17:44
  • @longneck: Ah, yes, sorry. Fixed.
    – einpoklum
    Feb 7, 2014 at 6:12

3 Answers 3

0

Your two options are RAID 1 or RAID 5.

If you need this to be up and the data to be safe even if you lose a disk I would configure it with a copy of /boot on each disk and then set up a partition for swap on each disk and then a third partition of equal size on each disk which I would set up with RAID1 across 2 disks with the third as a hot spare. The down side of this is that you will only have less than 1T of storage.

If you can afford to be down but the data has to be safe then I would set up 1 disk as the OS disk and then RAID 1 the other two to store your data on. If you lose the OS disk you will have downtime while you replace / rebuild. If you lose a data disk you will need to replace it ASAP but the data will still be there. If you can, buy a smaller, less expensive disk to be the OS disk and keep the third 1T on hand as a cold spare. You still only have roughly 1T of data storage, the bonus is that you can limp along using a live distro while your OS disk is replaced.

If you can afford to be down for a longer period of time or can just replace all of the data from another source then I would configure it with a copy of /boot on each disk and then set up a partition for swap on each disk and then a third partition of equal size on each disk which I would set up with RAID 5. This will give you roughly 2T of usable space but if you lose a disk you can rebuild the array. Until the array is rebuilt all data will be unavailable though. An alternate option would be to add a 8G or bigger fast USB drive and install the OS and swap on there and then raid 5 the three disk and use the full space for the data.

The correct answer will come from what kind of expectations there will be for the data in the event of a failed / failing disk.

3
  • Added an explanation about our server failure constraints. Now, is there a benefit to having a /boot on each disk, other than symmetry? And should I RAID0 the boot partitions, or use LVM on them directly, or just have 3 separate partitions and only use one?
    – einpoklum
    Feb 7, 2014 at 6:17
  • 1
    The issue with having /boot on the raid is that the raid won't be up before the system is booted ( I am assuming you are doing software raid ). Because of this it is SOP to put boot on each drive as well as the boot loader if you are running the OS on the raid to make sure that the system can come online.
    – meatflag
    Feb 7, 2014 at 14:39
  • After reading your update I guess RAID 0 is an option if you are going for the maximum disk space and minimum protection. This would give you the 3T of space as well as the ability to use all 3 disks at once for speed. This is high risk because there is no recovery if even one of your disks fails. You would still need to do a separate /boot and swap on each disk. On RAID 0 vs LVM, unless you plan on adding disks and growing the partition I would use RAID 0 to get the benefit of the disk speed.
    – meatflag
    Feb 7, 2014 at 14:50
0

RAID 5 across the 3 disks would give you a total storage capacity of 2TB, and you'd have the ability to withstand the loss of 1 disk in the group.

Be sure that you have another copy of your data, off-site. This setup will all the loss of a single disk, but a power surge or other accident could knock out multiple disks at once.

2
  • And you would suggest this even though for some of my data/files I don't need fault tolerance?
    – einpoklum
    Feb 7, 2014 at 6:12
  • yes. 1) it's simpler. 2) you never know what you are going to need. 3) your coworkers won't have to worry about where to put stuff, even though it is totally obvious to you it may not be to them. 4) you won't have to rebuild the system in case of disk failure. .... Of course, there are always exceptions. If you have lots of temporary files and need the best i/o performance creating and removing them, i might answer differently. but with the data you've given i would say this is the best choice.
    – Dan Pritts
    Feb 7, 2014 at 15:43
0

make a small partition for /boot on each disk. For bonus points, make it a 3-way raid-1. (as suggested by the other answer to put a copy of /boot on each disk)

make a big raid5 out of the large partitions. put LVM on top of that. I would probably just put one big / and one swap, but it's not unreasonable to make a separate / for the OS & such and then another partition for user data.

I would use the entire RAID as LVM space. I would not fill the LVM space entirely with logical volumes - leave some for future expansion and/or snapshots.

Make sure to install a cron job to scrub the raid every so often, weekly is a good bet. mdadm comes with such a job on redhat-ish linux.

The other poster's statement that you need to back things up off site is spot on. Do not mistake RAID for backups.

2
  • Should I avoid filling up the volume group with logical volumes, or avoid filling the RAIDed area with the (single) volume group? Or both?
    – einpoklum
    Feb 6, 2014 at 17:13
  • answer updated to address comment
    – Dan Pritts
    Feb 7, 2014 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .