Monday, August 1, 2011

Raid 1

Wow!! I was doing some research into setting up a linux file and print server and came across the concept of software Raid in linux. Are you kidding me!! Raid 0, 1, 5, etc. can all be done at the linux kernal level without the need of any special Raid hardware. The linux community is amazing! I love it.

So, I have an older desktop I wanted to use as a file and print server for the household and decided to set it up with a simple 2 disk Raid 1. This means the 2 hard drives are mirrored. You can have one hard drive completely fail and lose no data at all. This is perfect for a little light duty file server.  This is a bit slower than a one drive system, but that is not important because I am mostly concerned that I don't lose any data from the past 20 years.

I started by connecting 2 identical 300 gigabyte IDE hard drives that I already had in a ~8 year old computer. An old computer should work fine for this sort of need to spend any money at all.

You can follow the Ubuntu website documentation for setting up the Raid at installation time like I did at...

I setup identical boot and swap partitions on these two identical hard drives, and then created two Raid devices to mirror the respective partitions (md0 & md1). It is quite amazing that you can do all of this at installation time and the drives just start to sink up seamlessly in the background.

Drive 1:
sda1 - /boot
sda5 - /swap

Drive 2:
sdb1 - /boot
sdb5 - /swap

Once you have the Software raid setup, you can use the mdadm software to manage it.

cat /proc/mdstat

sudo mdadm --query --detail /dev/md0


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.