Installation

Now, to recap what we’ve done so far: we’ve installed mdadm, became familiar with Gnome Disk Utility, and formatted our drives with new partition tables so we can use them in a new RAID 5 array.

Now, we get to install, the RAID array.

In Disk Utility still, go up to the File menu, down to Create and then select RAID Array. In the Create Raid Array window, under General select the RAID Level:

Distributed Parity (RAID-5)

Name the array whatever you’d like, it really doesn’t matter at all.

For Stripe Size the default is fine, but essentially the larger the the stripe size the better the array is for larger files and read speeds. The smaller the stripe size is the better the array is for smaller files and write speeds.

For example if you intend to use the array for storing media files and playing them then the default or even the largest, 1 MiB, will likely serve you best.

However, if you have another use in mind for this array, you may want to adjust accordingly. Don’t bog yourself down with this though, use the default if you’re not sure and move on, there are more important things in life to spend your time on!

Now, under Disks we get to, you guessed it, select our Disks for the RAID array. Find and put a check mark next to the Hard Disks you wish to use in your array (the ones that you previously formatted with the GUID Partition Tables).

Note: Remember, you need three disks at a minimum, but you can use more if they are available, and are the same size. The smallest disk in the array multiplied by the total disks in the array will determine the final available space in your array. This is why I recommend using the same sized disks unless you have a good reason not to.

Once you have the disks check marked you will have the option to adjust the Array Size, unless you have a reason not to, I recommend leaving it at the default maximum size (if you do adjust it, parts of this guide may not work for you, and I cannot support it, so beware).

Now, triple check everything you’ve selected and then hit Create button at the bottom to begin the RAID creation process (you will likely be prompted to put in your user password once or twice).

Now, Disk Utility will create and then take you to the new RAID array underthe, likely new, section of Multi-Disk Devices. When you’re first inspecting your new RAID array don’t fret, it will initially be in a scary Degraded state. This is normal!

The array will begin to distribute parity information across the array, this process can take hours, days, or even longer depending on how many disks, the size and speed of the disks, and whether or not you begin to use the array while it is creating the redundancy information.

That’s right, if you format the array with a file system (Format Volume) you can begin to use the array now, however you will have zero redundancy, and even a single disk failure will cause you to loose ALL of the data on the array.

Using the array will also significantly increase the time it takes to go from a Degraded state to a Running state. I strongly recommend allowing the array to complete building itself before continuing on below with Setup.

Comments
24 Responses to “RAID 5 & 6 Install, Setup, & Configuration Guide for Ubuntu 10.04 LTS (Lucid Lynx)”
  1. IanK says:

    How would you recommend testing the array? I’d like to make sure it’s capable of recovering from a (staged) single hard disc failure. Could you also tell me how to restore it?

    • Anonymous says:

      Hi Ian,

      This is something I plan to add to my next revision of the guide. Simply shutting down the system and unplugging one of the drives should simulate a failure. From there use the Disk Utility to attempt a restoration. I haven’t played around with this yet so I can’t offer concise advice but I have little doubt it’s straight forward. A virtual machine could also be used for testing as well.

      Good luck!

  2. Anonymous says:

    Hey Ian,

    Yeah, if you’re wanting to fully restore the array swap out the old drive and swap in a blank one and then add it to the array and restore it.

    Take care,

  3. Jeremy Hannah says:

    Hello,

    Thank you for the excellent guide. I do have a couple of questions which I hope that you might be able to answer for me.

    Q1. At what point was Ubuntu installed?

    I have followed your guide to the point of formatting the volume. I saw in your comments that you made the following comment:

    “That’s right, if you format the array with a file system (Format Volume) you can begin to use the array now, however you will have zero redundancy, and even a single disk failure will cause you to loose ALL of the data on the array.”

    On page 4 of your guide you go onto format the volume using EXT4, so I am a little confused.

    I’m running an MSI K9N2GM/VM motherboard which has the ability to use the BIOS Raid 5, but following your guide plus a few other guides, I have turned the BIOS raid off.

    I’m primarily running the Ubuntu 10.10 live cd, but am going to try again with 10.04 this afternoon.

    The main problem I’m running into is that when I come to install Ubuntu, it complains about not being able to decipher the disk geometry.

    I would be very grateful for your guidance. Once again, a great guide!

    Many thanks in advance,

    Jeremy Hannah

    • Anonymous says:

      Hi Jeremy,

      The guide assumes you already have an Ubuntu or Linux Mint operating system installed on a different drive and are using the RAID 5/6 array for archival/storage purposes (not as a boot drive).

      I’m not sure what all problems you might run into with using this guide for a boot RAID 5/6 array as I’ve not tested or experimented with that. At very least you’d probably need to back-up your mdadm.conf file and import that into your new system.

      At least part of the reason for going with the software RAID 5/6 setup was so that it was independent of the operating system, using the RAID array as the OS boot disk seems to, at least partially, defeat this purpose.

      If you have any further questions please feel free to respond or email me directly, I’ll try to help out as best as I am able.

      Take care!
      daemox

      • John says:

        I am following your guide for Linux Mint and would like to setup the RAID 5 for my os. Could you tell me what steps I would need in order to successfully setup a raid 5 instance?

      • daemox says:

        Hi John,

        The steps should be very similar.

        I no longer run Linux Mint myself so I wont be able to give you a 1:1 guide.

        As stated in my guide this really isn’t a novice user’s topic, (especially if problems arise down the line).

        Best of luck to you though!

  4. Hal says:

    This was an awesome guide. Exactly what I had been looking for. I’ve been having some problems with the drives reporting that they are misaligned by XXXXXX (3072 bytes this time around) what gives? I have gone through this several times deleting the partitions on each drive and then reformatting the drives in GUID and recreating a RAID5. Can I ignore this, or what should I do different to start all over again.

    • Anonymous says:

      Hi Hal,

      Unfortunately, I’ve never ran into that issue so I’m unfamiliar with it. I’d recommend searching Google/Ubuntu/Linux Mint resources for answers. It may be related to your specific drives, or how they were partitioned. I honestly can’t say though.

      Best of luck!

      • Ozgur Gurtuna says:

        Hi there,

        Thank you for this fantastic guide. It was very useful for me. I had a similar issue with misalignment. In my case it was due to the 4096 byte sector size of my 3TB drives. I was able to resolve it by using GNU parted prior to setting up the RAID. I used these instructions: http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html

        I hope this helps.

      • daemox says:

        Hi Ozgur,

        I’m glad the guide worked out for you! Thanks for the note about the 3TB alignment as well. Unfortunately I haven’t gotten to play with 3TB drives yet so I’m currently unable to help with them. Happy you provided a link, cheers!

  5. Steve says:

    Hi :) This is not just an awesome guide. it’s absolutely amazing!! WOW! I’m quite new to Ubuntu and RAID and had absolutely no problem following the very simple but not over simplified steps and have now got 3x 2TB drives working in perfect harmony and auto-mounting at boot. I had Google’d for hours, trawling through complicated out of date guides that made me want to give up and shoot myself, and then I stumbled on this one. I would like to say a gigantic thank you to Daemox for all your time and effort on this guide, you deserve a huge pat on the back :) If anyone is reading this before they try and set up a RAID array and is unsure…don’t be, if I can do it then anyone can :)

  6. Steve says:

    Hi Daemox :)

    I have a quick question…I recently installed 3x 2TB WD Green HDD’s on an ASUS M4A88T Evo Board with Ubuntu 11.04 running off a 30GB SSD and a SATA DVD drive. The SSD and one of the WD’s are showing up under the SATA controller (Disk utility) and the other two WD’s are showing up under the PATA controller! As I wrote earlier, the RAID 5 seems to work fine (thanks to your excellent guide) but I just wondered if you knew any reason why the two drives show up on the PATA controller rather than the SATA? They all use SATA leads and I haven’t used any jumpers or anything else to change the drives! Would really appreciate any thoughts :)

    I have just read and used your XBMC guide too…eternally indebted ;)

    Steve

    • Anonymous says:

      Hi Steve,

      I was about to respond to your other comment but I’ll throw it all together here.

      Many thanks for the kind words, definitely appreciated. I’ve been a bit busy elsewhere recently, so this helps keep me motivated to keep my guides updated.

      As for the controller oddity, it may come down to how your motherboard’s north and south bridge are setup. The two WD SATA drives may be going through a make shift SATA connection that uses the PATA chip on the south bridge to add a couple extra ports to the mother board.

      If you’re worried you could use the benchmark utility in Disk Utility to see if there’s any performance impact on those two drives.

      Anyway, I hope Ubuntu/Linux works out for you, and thanks again for the comments on my guides.

      Best of luck and take care,

      • Steve says:

        Hi, I’m back again ;)
        After running my raid 5 array for a while on Ubuntu now I have encountered a whole heap of problems and have decided to give Suse 11 a go. I can see the three 2TB HDD’s and Suse tells me that they were in a Linux Raid, but I’m really unsure of how to re-assemble the array on Suse. The “Expert Paartitioner” seems like the right tool, but I don’t want to go in like a bull in a china shop and lose all the data on the array. Could you possibly point me in the right direction please :) Thanks in advance for any help or advice. Steve

      • Steve says:

        Hi, I’m back again ;)
        After running my raid 5 array for a while on Ubuntu now I have encountered a whole heap of problems and have decided to give Suse 11 a go. I can see the three 2TB HDD’s and Suse tells me that they were in a Linux Raid, but I’m really unsure of how to re-assemble the array on Suse. The “Expert Paartitioner” seems like the right tool, but I don’t want to go in like a bull in a china shop and lose all the data on the array. Could you possibly point me in the right direction please :) Thanks in advance for any help or advice. Steve

      • Anonymous says:

        Hi again Steve!

        Unfortunately, I have zero experience with RAID on SUSE. I haven’t even fired up a SUSE install in years. In Ubuntu 11.04 all that needs to be done now is to install mdadm and reboot. From there, the array will auto initialize and can be mounted manually or fstab can be edited to auto-mount it.

        Sorry to hear you were having issues, but not sure if a distro hop is the best solution for you.

        Cheers, and feel free to bounce ideas off me here or via email!

Trackbacks
Check out what others are saying...
  1. [...] This post was mentioned on Twitter by Rene Nachtnebel ✔ and Joe Hermando, daemox. daemox said: RAID 5 & 6 Install, Setup, & Configuration Guide for Ubuntu 10.04 LTS (Lucid Lynx) http://goo.gl/fb/nOPtn [...]

  2. [...] note, I have been waiting to write my upcoming Couch Potato guide, as well as waiting to update my RAID and SABnzbd+ guides (at very least) until Linux Mint 11 reaches release candidate or final status. [...]

  3. [...] year, and it will join the ranks of my other major guides (SABnzbd+, Sick Beard, XBMC Media Center, RAID 5/6) in being regularly maintained and updated (generally [...]



Leave A Comment

 







Hey! You! Enthusiastic Ainer.org reader! Are you noticing lots of blank space above this text and elsewhere on the site? Consider then, adding www.ainer.org to your adblock plugin's whitelisted domains! This site depends soley on ad revenue, affiliate links, and donations to pay for hosting and upkeep. If you find our ads obtrusive please let us know! Thanks for your continued support! Cheers!

QR Code Business Card