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?
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.
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.
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.