This time around, I will show you how to configure the software RAID using Debian. This also can be applied to Ubuntu system as their are based on Debian platform anyway. As I mentioned earlier, the Software RAID configuration can be quite troublesome and time consuming, but at least it is reliable and save a lot of cost when buying a hardware RAID instead.

For a normal installation of Debian or Ubuntu, you can refer to the links below for initial steps until the hard disk partitioning:

Please make sure before this installation, you will need 2 identical hard disk with same space connected to the server. But the truth is, you don’t need to same hard disk with the same space amount, but as long as you partitioned the space equally then it would be good as well. But for beginner, it is better to get a hard disk that got the same space quantity, less percentage that you would get yourself confused.

Below are the steps on how to configure the Software RAID:

1) Select the Manual for the Partitioning Method:

2) On this screen, it will show you the available hard disk for the installation. Make sure both hard disks are visible. Now select the first hard disk and hit Enter:

3) A message will warns you that you are about to create a new partition that will destroy any existing partition. Choose Yes to proceed:

4) You will noticed that it will create a new partition at the bottom of the hard disk. Choose the new partition and hit Enter:

5) Select the Create New Partition:

6) Since we are creating the partition for boot, just type 100 MB in the line:

7) Choose the Primary partition:

8 ) Choose to create new partition at the Beginning of the space:

9) On this screen, move you selector to Use As and hit Enter:

10) Please choose the Physical Volume For RAID option:

11) Please make sure that the Bootable Flag is tuned On:

12) Choose the Done Setting Up The Partition to save the new partition:

13) You will be taken back to the first screen. Next is to choose the next free space and hit Enter:

14) Select the Create A New Partition:

15) Now we are adding the new partition for the Swap. Please take note that always make sure that the Swap size is double the amount than your physical RAM. Since my physical RAM was only 384MB, so my swap size should be set as 768 MB in the box:

16) Select the Primary option:

17) Select the Beginning option:

18 ) On the next screen, move your selector to the Use As and hit Enter:

19) Select the Physical Volume For RAID option:

20) After that, just straight away select the Done Setting Up The Partition to complete:

21) Back to the original screen, select the another free partition again and hit Enter:

22) Select the Create A New Partition option:

23) Now we are creating the partition for root. So just use all the leftover hard disk space:

24) Select the Primary option:

25) Move the selector to Use As and hit Enter:

26) Select the Physical Volume For RAID and hit Enter:

27) After that, just straight away choose the Done Setting Up The Partition:

28 ) Now moving on to the second hard disk for the partitioning. Hit Enter and please follow the Step 3 – 27 to do the same partitioning with the 2nd hard disk:

29) After the 2nd hard disk has been partitioned, the overall partition configuration will look exactly like the bottom. Each space in each partition will reflect to each other in the 2nd hard disk. So now move the selector to Configure Software RAID and hit Enter:

30) Select Yes to accept the new partition changes:

31) Now we will group the RAID hard disk. Select the Create MD Device option:

58) Select the Done Setting Up The Partition to complete the /boot partition setup:

59) At the first screen again, now select the RAID Device #1 and hit Enter:

60) Move the selector to the Use As and hit Enter:

61) This time we are going to create a Swap partition for the operating system. So select the Swap Area and hit Enter:

62) Just straight away select the Done Setting Up The Partition soon done:

63) Now is to edit the last partition of the RAID which is meant for /root. Select the RAID Device #2 and hit Enter:

64) Move the selector to the Use As and hit Enter:

65) Select the EXT3 Journaling File System and hit Enter:

66) Now move the selector to the Mount Point and hit Enter:

67) Select the / – The Root File System and hit the Enter:

68) Finally select the Done Setting Up the Partition to complete the procedure:

69) The final outlook of the partition should be like below. Once confirmed, move the selector to the most bottom of the screen to select the Finish Partitioning And Write Changes To Disk and hit enter:

70) Just press Yes if you confirmed the partitions:

71) Then just follow the normal installation procedure. Once the server has been rebooted, log in as root and type cat /proc/mdstat to view the RAID status:

72) By default, the GRUB boot loader only were installed in one of the hard disk only. If you forgot this step, your second hard disk can’t boot by itself. You need to copy the GRUB from the SDA to SDB. Just type grub and follow like below, line by line:

device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
73) For Ubuntu users version 9.10 and above, the system will install the boot loader in both partition during setup as long as you enabled the Boot from Degraded Disk option.

74) Please take note that the software RAID will be running under MDADM. This is a software that being developed to handle the RAID procedure inside the server. You can type mdadm –help for further information