How to set up 2 RAID 1 HDDs?

1

I have a home-server (or I want to set one up) with one SSD as system disk and two HDD's for the data. Now the HDD's are new so they don't have any partition. What would be the best way to partiton it ? Just one big partition ? Or something like LVM (even though I don't know very much about LVM) ?

And if I'd partitioned one HDD - should I do the same with the other one (if you understand..) ?

Another thing is "when should I do this" ? I can configure the RAID 1 in the BIOS - but when I did so, I can't partition the second disk.

Hope you understand my question(s) :)

foodev

Posted 2012-11-19T15:58:58.733

Reputation: 13

Question was closed 2012-11-20T01:27:06.563

1The whole point of RAID is that you will only see one disk. – SLaks – 2012-11-19T16:04:12.090

To expand on that a bit further, RAID happens at the controller level and presents the resulting array to the operating system as a single disk. This is by design - if you want all your disks individually addressable then RAID doesn't suit your needs. – Shinrai – 2012-11-19T16:07:31.963

@Zoredache - I was responding to "I can configure the RAID 1 in the BIOS - but when I did so, I can't partition the second disk" so my use of "RAID" to mean "hardware RAID" was implicit, sorry for lack of clarity. – Shinrai – 2012-11-19T18:29:56.110

@Shinrai, Ah, must not have been paying enough attention. – Zoredache – 2012-11-19T19:30:31.080

I know that I'll only see one disk - but the other disk has to be formatted right ? – foodev – 2012-11-19T20:41:25.220

Answers

0

What would be the best way to partition it?

Best ways questions are always hard since they depends on both opinions, and on the experience of the person setting it up. E.g. if you know ZFS inside out then ZFS is a very good choice rather than classic partitioning and filesystems. If you never used ZFS and you want to be able to access your data when something goes wrong then the ZFS learning curve is bad.

Having said that: I see these options:

  • OS on SSD, both disks via mdadm (software RAID). Mirror the whole disk, then treat that as a regular drive and set up different partitions.
  • OS on SSD, both disks via mdadm (software RAID). Use raid per volume. This way you can combine both mirrored volumes for data, and use other partitions in stripe (e.g. temp folders for a database. Or swap in either a stripe or two swap partitions, one on each disk). This is more flexible and more complex.
  • Hardware RAID. This usually only works on whole disks.
  • ZFS RAID, possible with the SSD as a cache device. Most complex solution. But if you know ZFS it can do wonders.
  • Software RAID via LVM. Same as first two choices, but possibly compatible with a windows setup. Might be interesting in the case of dual boot and shared data.

I can configure the RAID 1 in the BIOS -

RAID 1 in the BIOS is often intel fake RAID. Basically software RAID tied to a specific generation of motherboards. Unless you have very good backups or a spare motherboard of the same generation I would not use this. (If you have several identical machines in an office and you can borrow one then go ahead. If it is your only PC is the same model, avoid)

but when I did so, I can't partition the second disk.

If by the second disk you mean the combined HDDs then something is wrong. Did you load the relevant drivers? (SSD as first disk, mirror as second disk).

If you meant that you do not see two separate HDDs anymore, then it is working as intended.

Hennes

Posted 2012-11-19T15:58:58.733

Reputation: 60 739

You say that I shouldn't use the RAID option from the motherboard - but why exactly ? And what would be better ? With this two disk thing I meant that I have to format each of the disk don't I ? – foodev – 2012-11-20T08:40:37.927

Both hardware RAId and fake RAID via the motherboard have the same disadvantage: When the HW RAID card or the motherboard dies you need to get a new one before you can access the disks. With HW RAID this is obvious and an similar model often works. Same with Intel 'fake' RAID, but they have several differences per generation. Which means you want a same generation or even same generation+same_BIOS board. I have more confidence in getting a replacement RAID card. Which means that for home users software RAID tied to an OS (and not to hardware) is often the best solution. – Hennes – 2012-11-20T13:53:44.730

With two disks in RAID you should only see one logical disk. YOu format the logical disk. Comparare it with a person at the end of a phone line. Usually you ask him to write or read something from a book (disk). Now you tell him that whenever you ask for a specific book he needs to write it down in two books instead. Whenever you askhim to read from the book he can read from either book. If one of the books gets unreadable then there is always the other. But as far as you are concerned on the other side of the phone he still seems to use one book. – Hennes – 2012-11-20T13:56:36.143

ok .. I guess I got it. But is it possible to check if the data was copied to the second disk ? – foodev – 2012-11-21T10:51:38.747

All writes should go to both disks (including the writes from formatting). If that fails then you get a warning. Just how you get that differs with how you set up the disk. E.g. my HW RAID will email me if a drive fails. In the case of software RAID it depends on how you set it up. E.g. it might just be a single exclamation mark in disk management (as in http://i.stack.imgur.com/73IvT.png )

– Hennes – 2012-11-21T11:52:40.277

I actually wanted to do it via the BIOS option. But there's no option to activate a email notification or something like that. Or is it no good advice to use this RAID function (based on your first comment). – foodev – 2012-11-21T12:10:59.570

0

Since I gather that you are running Linux, my suggestion is that you create one big single partition on each drive, and setup your software RAID on the partition. If you want the ability to break that up into smaller partitions, then setup LVM on top of the RAID.

Zoredache

Posted 2012-11-19T15:58:58.733

Reputation: 18 453

0

I recommended ZFS for the home server: bit rot prevention, easy snapshotting (so you may hack a script to do daily incremental backups to S3 if you want), no need for hardware RAID controller or fake RAID (ZFS can read from other disk if checksum is invalid, unlike any top-notch hardware), ZFS is able to store multiple copies of some subset of your data (e.g., 2 copies on each of 2 disks = 4 copies in array). Though I run ZFS under FreeBSD, so I'm not sure if it will work fine under Linux.

Mikhail Kupchik

Posted 2012-11-19T15:58:58.733

Reputation: 2 381