Skip to content

Install Debian Etch on a Software Raid 1 with S-ATA disks

New server, S-ATA disks, the hardware RAID controller is not really supported. So we decided to use a software RAID 1 for the two disks. Here are the steps to create the RAID:

  • Boot the Debian Etch installer.
  • If the installation comes to "Partition method", use "Manual".
  • In the following menu, scroll to your first disk and hit enter: the partitionier asks you, if you want to create an empty partition table. Say "yes". (Hint: this will erase your existing data, if any.)
  • The partitioner is back in the disk overview, scroll one line downwards over the line with "FREE SPACE" and hit enter.
  • Create a partition with the size you need, but remember the size and the logical type.
  • In the "Partition settings" menu, go to "Use as" and hit enter.
  • Change the type to "physical volume for RAID".
  • Finish this partition with "Done setting up the partition".
  • Create other partitions on the same disk, if you like.
  • Now repeat all the steps from the first disk for the second disk.
  • After this, you should have at least two disks with the same partition schema and all partitions (beside swap) should be marked for RAID use.
  • Now look at the first menu entry in the partitioner menu, there is a new line: "Configure software RAID". Go into this menu.
  • Answer the question, if you like to write the changes, with "Yes".
  • Now pick "Create MD device".
  • Use RAID1 and give the number of active and spare devices (2 and 0 in our case).
  • In the following menu, select the same device number on the first and second disk and Continue.
  • Repeat this step for every two devices until you are done. Then use "Finish" from the Multidisk configuration options.
  • You are back in the partitioner menu and now you see one ore more new partitions named as "Software RAID Device". You can use this partitions like any normal partition and continue installing your system.

Have fun.

Thanks to mastermind from #postgresql-de for all the help.

Trackbacks on : PingBack

Show preview
Comments () on : PingBack

Show preview
Comments ()


Display comments as Linear | Threaded

starless on :

Thank you, this page has been useful to me when installing Etch on a software RAID 1 (first time I used software RAID).
Comments ()

Mike on :

Thank you so much! This is exactly what we needed for our new production server. We wasted several hours before stumbling on to this page. Thanks again. Mike
Comments ()

Brian Henn on :

I tried to follow you directions. However, when I remove one of my two drives, the system still boots fine. When I swap which drive I remove the system will not boot. I was under the impression that the system should work with only one drive. Should I have swap on both disks? Should I try to raid swap space also? thanks
Comments ()

frank habermann on :

Hi, you should mirror als partitions on this two raid disks! also swap! Also install the bootloader on the two disks. After that you have no problems! Frank
Comments ()

David on :

No need to mirror the swap ! You can create two identical swap partitions on both of your disks and the system will use both. That way, your swap won't have the RAID1 (mirror) processing overhead.
Comments ()

Someone on :

And it will crash as soon as a disk is broken because the virtual ram is gone. Put anything vital on raid. For dynamic repartitioning put LVM on top, for filesystem encryption LUKS on top of LVM. starting with LVM on top of RAID you may experiments Problems with insufficient initrds, that fail to mount your root filesystem.
Comments ()

Ben Tkhayatt on :

Thanks for this great article; it's a good job! ^^
Comments ()

Paul Langham on :

Should the grub bootloader work with this config? Some details about getting it to boot might be helpful here. As the fellow Mike above said I have also saved quite some time coming across your article and feel that we are very close to having this working but we just cant get grub to load. I don't want to go into all the details to lead to supporting this here but wanted to thank you for the very valuable info. (we are actually going to do raid 1 0 with this so that should be fun.) any info about grub will also be very appreciated if you may be able to help. PL from Canada
Comments ()

Anonymous on :

Try reading as a followup for RAID installation.
Comments ()

Bonny on :

So, did you or anybody else solve this GRUB + RAID issue? I always get stuck at boot and don't know how to configure GRUB before rebooting the PC at installation end. Help please! Thanks...
Comments ()

Anonymous on :

Do a "grub-install" on both halves of the RAID1'ed partition with /boot on it. Then, in your /boot/grub/menu.lst, specify that md device. Then, either disk could fail but you'll still be able to boot. Tried, true, and tested.
Comments ()

walter on :

hallo thanks for the article! has anyone had any success with dual-boot and this setup? i went through the installation process (win xp already installed on the raid1 array). when asked for dual boot win xp is shown twice. after reboot the grub loader gets stuck at level 1.5 (prints this level endlessly). any hints would be great! :)
Comments ()

fer on :

thanks dude!! You helped me much with your article. Really appreciated. Cheers!!
Comments ()

Kelvalok on :

Thank you very much!
Comments ()

Chris on :

this howto works flawlessly on debian lenny. the only thing that isnt here is to set the mount point for / on the raid partition. thanks for figuring this out and thanks for sharing!
Comments ()

mostafa faridi on :

thanks nice article , but I have question for make partition like root , boot , home . which one I must use raid partitions , or I have to partitioning each hard disk and I have to make same partition in two hard disk ? is enough I partitioning only raid partition and it make effect on each hard disk ?
Comments ()

Andreas 'ads' Scherbaum on :

Note: the article is probably outdated, because it's written for Debian Etch. Anyway: you have to repeat the steps for each harddisk.
Comments ()

Troy on :

Thanks for the help on this. It made my first attempt at software RAID a success.
Comments ()

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
Form options