Dec 10, 2007

How-To Setup RAID1 on Ubuntu OS

This short how-to provides a step-by-step process on setting up a software based RAID1 disks on Ubuntu system. RAID (Redundant Array of Inexpensive Disks) is a computer storage schemes that divide or replicate data among multiple hard drives (array) and is designed to provide data reliability or performance or both.

RAID1 configuration is a mirrored set that duplicates data across several disks at once. Such configuration provides the following advantages:

  • Fault tolerant from disk errors and single disk failures and
  • Increased read performance. Atleast 100% for two disks in array.

Requirements:

  • Atleast two identical SATA hard disks
  • Optional one(1)SATA hard disk with same size as that of the first two for hot spare
  • Ubuntu Alternate CD (x386/x64)
  • A PC with CDROM Drive

STEP 1: Initial Setup

  1. Insert the Ubuntu Alternate CD and make your CDROM the first bootable device.
  2. Select [Text Only Installation] from the selection menu upon boot up.
  3. Select the appropriate language of your choice and keyboard formats.
  4. Upon reaching the hard disk partition setup, choose [Manual Partition]

STEP2: Partitioning

  1. The Ubuntu Partitioner will detect the number of hard disk devices available in your computer. For our setup we have 2 disks with 250G each and this will be identified by your Ubuntu partitioner as: sda(SATA Device A) and sdb(SATA Device B) respectively.
  2. Partition each device with the following configuration:


Device

Partition Type

Size

Bootable

sda

RAID

249.5 G

Yes


RAID

0.5 G

No

sdb

RAID

249.5 G

Yes


RAID

0.5 G

No

Note: Instead of choosingExt3 filesystem as what you would normally do when partitioning a non-raid drive, select RAID for all partitions allocated for each device.

3. Proceed writing to disk for changes when prompted.


STEP3: Configuring RAID

  1. Select [Configure RAID] option
  2. Select RAID1
  3. Type 2 for the number of active devices
  4. If you have 1 hot spare disk available, type 1 or 0 if non available.
  5. Select sda1 and sdb1 which will be represented as md0 and used for installing root files. The equation for this will be: md0 = sda1 + sdb1.
  6. Your done setting up the first multidisc device (md0).
  7. Create another Multidisc Device
  8. Type 2 for the number of active devices
  9. Select sda2 and sdb2 which will be represented as md01. This will be used for swap space later. The equation for this will be md1 = sda2 + sdb2
  10. Your done setting up the second multidisc device (md1)
  11. Finish creating multidisc.

STEP4: Setup File system

  1. Setup md0 device as Ext3 File system type and mount it as root (/).
  2. Label it as root and flag it as bootable
  3. Setup md1 device as swap.
  4. Write changes to disk

That's it!

Stumble Upon Toolbar

No comments: