2012-06-23_02-24-06_238

Installing Ubuntu Server 12.04 LTS using Hardware Raid1

So my new 10,000 rpm raptor drives came in today, and I’ve had a sabrent hardware 4 port sata raid controller sitting around for a while, and decided to put them to work in a desktop server I plan on migrating the site’s I host (including this one) over to during the next few weeks.

One of the main reasons for the move is I this new raid1 setup will help ensure that me and my clients data will remain safe, in the case of a hardware failure. While I do currently backup with mysqldump and some rsync magic, restoration is alot easier using raid, then moving and re-installing everything from backups, not to mention just add’s to the geek cred :)

However I ran into a problem installing grub the error stated:

Unable to install GRUB in /dev/mapper

Executing ‘grub-install ‘/dev/mapper’ failed.

This is a fatal error

and because I haven’t had a lot of experience with either raid configurations or ever having installed linux to a machine with such a configuration I needed to do some research.

I found a few good posts, but most of them recommended creating another partition just for grub, and then using the raid drives for the rest of the install.

To me that sounded like a poor workaround, I want the data to be mirrored on both drives, equally, grub and all.

That led me to try a few other avenues to figure out the correct and easy way to get through the install.

Long story short, here’s a breakdown of how to get it setup and working, the easy way. In this breakdown I’ll assume you can follow the easy installer prompts for Ubuntu, have “activated the serial ata raid devices”, have taken note of the array’s name (you can take note of it on the “[!!]  Partition disks” screen that looks like the purple box on the left. (sorry not a vm so I had to take a picture of the screen…) in my case the name of the array is “sil_biegdfaaeabh”, and have continued onto the part of the install where it asks where to install grub.

  • First let’s find the name of the raid array, in case you forgot to take note of the name as mentioned in the previous paragraph (as I’ve done a few times when just mindlessly pressing next in the wee hours of the morning..) press Ctrl +alt+F2 to drop into a busybox terminal session. Press enter when prompted to start the terminal.
  • Type in the command


    and find that funny-named array after the entry named controller and then head back to your install terminal by pressing Ctrl+Alt+F1.
  • enter that name after the /dev/mapper that is populated by default during install. In my case:

    Of course CHANGE THE NAME and substitute your OWN in the example above!
  •  Continue setting up Ubuntu as you see fit, as the rest should complete without any further hassle!
In my case, I think after an update&&upgrade and mabye
IF you feel like having a desktop to work with, of course. I’m starting to like XFCE a lot more these days, and the Midori browser is coming along nicely, so also give that a consideration. Some tasks I just find easier with a mouse and desktop, notice I didn’t say faster, but this post is all about easy!
Then it’s on to something like ISPConfig3, I’m still loving the ease of administration of my web hosting and haven’t seen anything else close to as feature packed!
As for the actual migration, I’ll probably be too busy with it to document it fully, but I might write-up some helpful reminders for you and I if I find the time.

22 thoughts on “Installing Ubuntu Server 12.04 LTS using Hardware Raid1”

  1. running Google Chrome 20.0.1132.57 Google Chrome 20.0.1132.57 on Windows XP Windows XP
    Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

    Thank you! Talk about struggling to get something really simple done. Your solution got me installed first time! Thanks again!

    Al

    1. running Google Chrome 20.0.1132.57 Google Chrome 20.0.1132.57 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

      Awesome! So glad I could help.
      I too struggled with this and am glad my braindump was able to get you up and running!
      Enjoy your new install!

  2. running Internet Explorer 9.0 Internet Explorer 9.0 on Windows 7 Windows 7
    Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

    Thank you VERY much. I’ve been pulling my hair trying to figure this out – can’t belive it is not described as simple as you did anywhere else?

    1. running Firefox 14.0.1 Firefox 14.0.1 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1

      Sweet! I love it when I help others I’ve never met! I hope it turns out to be a great machine for you!
      I’m not sure of your plans, but if you were going to make it a web server, I highly recommend checking out ISPConfig! I have no affiliation with them, I just love what “Falco” has provided! (from the howtoforge forums, any of the “perfect server” posts are GREAT!) Sorry for all the plugs, I just have found them a great help as well!

  3. running Firefox 15.0 Firefox 15.0 on Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0

    Man I can thank you enough for posting this. Its SO OBVIOUS what to do with a RAID drive once you read this post. I beat my head against a wall for almost 5 hours before finding this post. Works like a charm!

    Thanks again.

    1. running Google Chrome 21.0.1180.89 Google Chrome 21.0.1180.89 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1

      Again Thank you for taking the time to post, I’m excited that this has helped out so many people, it is quite a pain to not have this anywhere in the documentation, but that’s what community’s are for I guess!

      Glad your up and running, enjoy your install!

  4. running Firefox 14.0.1 Firefox 14.0.1 on Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20120722 Firefox/14.0.1

    Massively helpful! Well wrote for people with the same or similar problem to follow through. Thank you sir!

    1. running Google Chrome 22.0.1229.79 Google Chrome 22.0.1229.79 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4

      You’re very welcome! Glad it helped!

  5. running Internet Explorer 10.0 Internet Explorer 10.0 on Windows 8 Windows 8
    Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)

    Thx for this post, you saved me :)

  6. running Google Chrome 24.0.1312.57 Google Chrome 24.0.1312.57 on Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17

    How about RAID5?

    I can execute the command: ls -l /dev/mapper

    This lists 5 items:

    Control
    isw_deefihbahf_POOP
    isw_deefihbahf_POOP1
    isw_deefihbahf_POOP2
    isw_deefihbahf_POOP3

    I then select in the install, to use: /dev/mapper/isw_deefihbahf_POOP

    This installs fine, and finishes the install, but upon reboot the computer says it cannot find the correct boot, and to insert the correct boot disk and click any key.

    Thoughts?

    1. running Google Chrome 24.0.1312.57 Google Chrome 24.0.1312.57 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17

      When installing grub, where did you tell it to look for as a startup drive?

  7. running Firefox 18.0 Firefox 18.0 on Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0

    I want to thank you for your post. I was able to solve my lack of booting on the hardware RAID5 from a SuperMicro SuperServer 6016T-URF with the X8DTU-F motherboard. Supermicro claimed no compatibility with Ubuntu 12.04 LTS, you post led me to prove them wrong.

    After running the listing in the /dev/mapper directory and failing with the long name for the primary partition, I took note that there was also a link for each partition show in the /dev/mapper directory to the /dev directory. The one used to solve my issue was /dev/dm-0! Instantly the grub wrote and I was in RAID5 heaven as the server rebooted and I gave a resounding “HA HA I WIN!!”

    Thank you for leading me to the water so I could drink!

    1. running Google Chrome 24.0.1312.57 Google Chrome 24.0.1312.57 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17

      I’m glad that I was able to help you get running on your Raid-5 heaven!!!

      I’d also like to thank you for returning so that other’s might read your comment if they are in a similar situation, and have the solution!

      Thank YOU Binky! :D

  8. running Safari 6.0.2 Safari 6.0.2 on Mac OS X 10.8.2 Mac OS X 10.8.2
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17

    Oh my god, Thank you so, SO much. That solved my problem perfectly!

    Haha, our sysadmin was unable to do anything with the server and went home swearing. I can’t wait to see his face monday when I tell him that I was able to do what he couldn’t. Especially since I am the UX guys that use those noob computers decorated with fruit and thus “don’t know much”. That’ll show him :P .

    Bless you and all your descendant my friend :) .

    1. running Google Chrome 25.0.1364.97 Google Chrome 25.0.1364.97 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22

      HA! These comments are the reason I do this stuff!
      I’m so glad you were able to get this up and running, and hope it get’s you some added respect/credentials around the office! Happy to have helped! :D

  9. running Google Chrome 25.0.1364.172 Google Chrome 25.0.1364.172 on Windows 8 x64 Edition Windows 8 x64 Edition
    Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22

    Im new to linux and currently trying to build a 9Tb raid array with 4 3TB disk on a HP 310e Gen8 server and this problem is KILLING ME!! :)

    And Daniel i can’t get your solution to work.

    Im trying to install Ubuntu server 12.04.something LTS

    In the Partition disks step i have done the following:

    Made a swap space on each disk
    Made on raid 5 which is EXT 4 root

    I couldn’t see where the name of the raid sould appear here so i tried you busybox terminal thing. Also like Binky i guess i have to use dm0 which is the only name on the list under /dev/ that makes any sense to me.

    Now to get the timeline of what i did correct..

    So i made my raid as described above..

    I clicked through the wizards and when it got to the grup it fails on me with this error “the failing step is install the grub boot loader on a hard disk”. Now i assume thats the same error you had because i found your site by searching that text string.

    So i clicked ok to the grup error and that takes me back to the installation menu where all the installation steps are.

    I went to the busybox terminal and wrote:

    lang=”bash” lines=”no” title=”/dev/md0/

    it seems to accept the command, there was no output. I went back to my installer wizard and tried to start the grup installer again but with no luck…

    PLEASE!!!!! what am i doing wrong??? I have been at this for days!!! help the poor little windows admin please :P striving to be the Linux ace he so dream of (ok that was perhaps a little too much) :)

  10. running Firefox 11.0 Firefox 11.0 on Ubuntu Ubuntu
    Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0

    I followed your instructions and found stuff like
    /dev/mapper/isw_cbgacicfa_volume0p1 Linux device-mapper (linear)(995.9 GB)
    and
    /dev/mapper/isw_cbgacicfa_volume0p1 Ubuntu 12.04 LTS (12.04)
    l tried both the above but still get “CD-ROM Boot Priority ..No Medium” when I reboot.

    I managed to go into the boot bit of the bios and select RAID as the secondary boot device (after the CDROM) but still get “CD-ROM Boot Priority ..No Medium”
    If I select Ctr I on startup it suggests (I think) that I “Rebuild the RAID within the operating system” – Do you think I should?

  11. running Chromium 25.0.1364.160 Chromium 25.0.1364.160 on Ubuntu Ubuntu
    Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22

    Working on my Dell Precision Workstation 390 with ubuntu server 12.04 64 thanks !

  12. running Firefox 30.0 Firefox 30.0 on Ubuntu x64 Ubuntu x64
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

    I’ve recently been playing with some software raid and will have some mdadm goodness coming up for those going that route! Stay tuned!

  13. running Internet Explorer 9.0 Internet Explorer 9.0 on Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

    Hi,

    I have 4x 4TB harddrives that I configured hardware RAID 1+0 on. After installation of ubuntu 14.04 I get this:

    “error attempt to read or write outside of disk ‘hd0′ .
    Entering rescue mode…
    grub rescue> _”

    I have been told I need to get grub to read the RAID controller, but how do I do that?

    Thanks in advance!

    1. running Internet Explorer 9.0 Internet Explorer 9.0 on Windows 7 x64 Edition Windows 7 x64 Edition
      Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

      turns out /boot needed its own partition.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">