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 thing...no 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...

https://help.ubuntu.com/community/Installation/SoftwareRAID

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



Links:
http://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array
https://help.ubuntu.com/community/Installation/SoftwareRAID
http://en.wikipedia.org/wiki/RAID
https://help.ubuntu.com/10.04/serverguide/C/advanced-installation.html
http://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array
http://nwlinux.com/diagnosing-a-degraded-ubuntu-raid-1-array/
http://advosys.ca/viewpoints/2007/04/setting-up-software-raid-in-ubuntu-server/
http://tldp.org/HOWTO/Software-RAID-HOWTO-2.html
http://ubuntuforums.org/showthread.php?t=408461
http://www.linuxjournal.com/article/6412
http://www.linuxjournal.com/article/5898
http://shop.oreilly.com/product/9781565927308.do
http://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array
http://www.brighthub.com/computing/linux/articles/37236.aspx#
http://tldp.org/HOWTO/Partition/setting_up_swap.html
http://en.wikipedia.org/wiki/Mdadm#Types_of_physical_device
http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/
https://help.ubuntu.com/community/Installation/SoftwareRAID
http://www.handson.ca/tutorials/samba.html

No comments:

Post a Comment

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