Todd Smith Org

April 20, 2009

Setup RAID on Ubuntu Desktop

Filed under: Uncategorized — admin @ 9:37 am

I have a client who needed a nice little web design station using open source software. One of the requirements is to have RAID. So, having used linux software RAID for about 10 years now, I am very comfortable with it. Unfortunately the installer in Ubuntu Intrepid does not seem to have support for configuring the software RAID, LVM, Encryption and all that rot.

So let’s do it from the terminal, Install as normal and then use the following process.

Change the partition types on your disk to 0xfd. I reconfigured /dev/sda as follows:

root@ubuntu:~# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x965c0f26

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          20      160618+  fd  Linux raid autodetect
/dev/sda2              21       60000   481789350   fd  Linux raid autodetect
/dev/sda3           60001       60801     6434032+  83  Linux
root@ubuntu:~#

Then copy that partition table to /dev/sdb

dd if=/dev/sda of=/dev/sdb count=1 bs=512

Now reboot, or Call “Call ioctl() to re-read partition table.”

Now it’s time to install mdadm

apt-get -f -y install mdadm

And finally, setup the RAID

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2

Verify the raid status with:

cat /proc/mdstat

Change the /etc/fstab

instead of LABEL=blahblah

change to /dev/md0

I’m sorry, this is incomplete

R

1 Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress