RAID1 Installation Part 1

Posted on August 29, 2009 | Category: Informational, Linux, Non-Linux Operating Systems, Resources, Ubuntu, bash


I have installed several RAID1 configurations and thought that I might document them here for others to gain from my painful experiences. There are so many RAID tutorials on the internet that it is overwhelming. Even after reading all of them, I still managed to make errors. The important aspect of this is that I have corrected them and have a bomb proof server.

INSTALLATION

A RAID1 installation requires 2 identical hard drives (they can be different capacit drives but need to be of the same brand and model). Using your Ubuntu Server install CD, create 3 partitions that are RAID arrays. I used three partitions because it works well. 1 partition of 1GB for the boot loader, 1 partition of 2GB for the swap, and the remaining space for your distribution. Back to the installation… I created these 3 partitions on each drive and made them RAID (not ext3 – that will come later). When you are done with that, create a RAID MD device (actually 3 of them) You have to remember which partitions are for what. For instance, sda1 and sdb1 are for the /boot and so on. the RAID MD is where you specify ext3, swap, and /boot.

Finish the installation and verify your installation with the commands below.

Verify your md0, md1, and md2 software RAID partitions with the command below. You need to check all of your md* partitions to ensure that you did your job correctly. Initially, you should see that your array is syncing as a percentage. Depending on your hard drive size and processor, it could take 30 minutes to several hours to complete the mirroring.

sudo mdadm --detail /dev/md0

Another classic command is:
sudo cat /proc/mdstat

If all is well, you should see something like this.
md2 : active raid1 sdb3[0] sdc3[1] 242236032 blocks [2/2] [UU] md4 : active raid1 sdb2[0] sdc2[1] 1951808 blocks [2/2] [UU] md3 : active raid1 sdb1[0] sdc1[1] 979840 blocks [2/2] [UU]

More useful RAID diagnostic and fstab commands in RAID1 Installation Part2

If you have further questions make sure to comment here or check out this guy’s page (http://kuparinen.org/martti/comp/ubuntu/en/raid.html).

Similar Articles

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image

Design: YGoY TopOfBlogs