So finally, I have a RAID 1 array. I’m using gentoo and dmraid to setup a raid 1 array. I always wanted a raid setup, but never really set one up for various reasons. One of the reasons was no extra hardware and I didn’t want to spend the money. Another reason was I just didn’t believe that software raid could perform.
But then a friend of mine got a ReadyNas drive. And it has Debian on it and allows to put Apache/PHP and other things on it. This made me think that a $300-$400 device that has Debian on it couldn’t be doing hardware raid on a dedicated controller. That meant software based raid isn’t just for nerds using linux. It’s for anyone who wants a real raid setup without having to pay 1000s of dollars for hardware controller.
So using the following link, I setup my gentoo server.
http://en.gentoo-wiki.com/wiki/Software_RAID_Install
I had an older machine that was available to me. And a drive in an external enclosure that had a eSata and USB 2.0 interface.
Hardware Specs
Sony Viao
* CPU: 1.5Ghz Single Core
* Mem: 256MB.
* Harddrive: 400G EIDE.
Second Drive
* Harddrive: 300G SATA
* Connect to an external enclosure with eSATA or USB 2.0 connector.
Plan of Action
Since the disk weren’t the same size, the plan was to partition the smaller one first. Then the partition table can be created on the second one. Then the OS can be installed. And there’s a problem here. The smaller one has data on it that I wanted to keep. New plan….
- Copy data from smaller disk to bigger disk.
- Parition smaller disk.
- Create degraded raid1.
- Install Gentoo.
- Copy data over.
- Partition the other disk.
- Add disk to raid1.
Problem! The mobo/bios doesn’t support booting from a USB device. Even tho, the bios has a setting for it, I have never gotten it to boot from a USB media. New plan….
Forget the data. Just isntall the OS. There’s a backup of the data.
———————————
Eventually,
- Installed on the smaller disk.
- Installed grub to MBR.
- Rebooted, still using minimal isntall CD.
- Add the bigger disk and let it create the raid1 image.
- Installed grub to bigger disk mbr.
This made the system bootable. However, everytime the system booted, it would show degraded array. The USB 2.0 drive would just fall out of raid. Even after adding and recreating the array, after boot it would just degrade.
Went out and bought a SATA PCI card for the older mobo. Installed the card. Luckily, the kernel has drivers for it. Recompiled the kernel and the drive was visible.
Re-added the smaller drive. It work just fine. And now the array is up.
:)