Search This Blog

Wednesday, November 24, 2010

Media Server Update - Setting up RAID 1

To set up the OS on a RAID 1 (the 2 250GB HDDs), I followed this wiki pretty much verbatim:
https://wiki.archlinux.org/index.php/Convert_a_single_drive_system_to_RAID

To get to this point, however, I simply installed Ubuntu using all the normal setup options onto a single 250GB hard drive.  I have a 100GB partition for the ext4 filesystem, a 10GB partition for swap, and whatever was left over for future use.  This was on /dev/sda (sda1 being the 100GB, sda2 being the 10GB).  So when I went to go set mine up, I started with a fresh wipe of /dev/sdc - nevermind the incorrect cable configuration - and followed the wiki.  The only difference I noted was that he created the swaps physically before the OS on the hard drive (starting with cylinder 1), so when the wiki talked about created a swap at /dev/sdb1, I simply did mine at /dev/sdc2.

I'm using a later version of Grub, so I did not configure the menu.lst (Grub 2 will do this for me automagically).

Quick tips in the alter Fstab part:
blkid will get you the UUIDs of the hard drives... but why would you want to break out the pen and paper, then risk the chance of getting a character wrong? Try this:
mv /mnt
cp /mnt/new-raid/etc/fstab fstab.txt
blkid >> fstab.txt
This copies the current fstab and appends the output of blkid to the end of the fstab file
Now, pear it down to the info you need:
vi fstab.txt
Comment out the old stuff, and make the new stuff match the old stuff (ie: take out the "...", labels, etc.)  New to VI? Take a look at these basic vi commands.

After running mdadm --detail --scan >> /etc/mdadm/mdadm.conf
you may like to vi that file as well to remove the metadata=00.90 (at the very end) to avoid getting an error.  If not, update-initramfs will just throw a flag and then say it ignored it... which shouldn't be an issue

After running the perl script, it should come back with nothing.  To exit the perl script command line, Ctrl+C

No comments:

Post a Comment