How to: Setup RAID in Linux Mint 7 Gloria

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to: Setup RAID in Linux Mint 7 Gloria

Postby webslave on Thu Aug 13, 2009 1:21 pm

This worked out well for me, but I found an updated way of doing this.
Go to: https://help.ubuntu.com/community/FakeRaidHowto

This is the way I did it. This kinda reduces some of the wait time too.

If you need more information about any given read any of the additional information below
Boot the Live CD
Open a terminal
Enter the following commands

    1. $ sudo modprobe dm-raid4-5
    -- skip the first one if you are doing RAID 0 or 1
    2. $ sudo apt-get install -y dmraid
    3. $ sudo swapoff -a
    -- disables erroneous use of the backing swap partitions if you are reinstalling (skip if fresh install)
    4. $ sudo dmraid -ay
    -- Now check that you can view the partitions in the raid array with this command
    5. $ ls -l /dev/mapper/
    Code: Select all
    OUTPUT:
    control             isw_beeaakeeaa_five

    -- we will be using the array /dev/mapper/isw_beeaakeeaa_five in this example.

    6. $ sudo cfdisk /dev/mapper/isw_beeaakeeaa_five
    -- Create partitions on your raid array with your preferred partition manager, or do so using the partitioning tool provided in ubiquity (make sure you select your RAID array)
    -- We used /dev/mapper/isw_beeaakeeaa_five5 partition as Linux Mint root partition in this example.

    Begin the install process
      1. If doing a guided install make sure you select the raid partition. if you are going to do a manual install make sure you do not create a partition on any of the disks that make up the raid partition.
      2. On the last step before installing, click the Advanced options and uncheck the install boot loader option. We will install grub (the boot loader later).
      3. After installer finishes, close ubiquity installer without rebooting the machine.
    Install dmraid and grub in your new Ubuntu installation:
      1. $ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /target/
      -- if this fails maybe the /target directory is already mounted if not then some debuging will be required. If any more information can be provided related to this issue place add your knowledge to this document
      2. $ sudo mount --bind /dev /target/dev/
      3. $ sudo mount -t proc proc /target/proc/
      4. $ sudo mount -t sysfs sys /target/sys/
      5. $ sudo cp /etc/resolv.conf /target/etc/resolv.conf
      6. $ sudo chroot /target/
      **** You can combine all of these steps by entering:
      Code: Select all
      $ sudo mount --bind /dev /target/dev/ && sudo mount -t proc proc /target/proc/ && sudo mount -t sysfs sys /target/sys/ && sudo cp /etc/resolv.conf /target/etc/resolv.conf && sudo chroot /target/

      7. # apt-get update
      8. # apt-get install -y dmraid
      9. # apt-get install -y grub
      10. # mkdir /boot/grub
      11. # cp /usr/lib/grub/x86_64-pc/* /boot/grub/
      -- replace x86_64-pc with i386-pc if using 32 bit version
      12. # grub --no-curses you will now be at the grub prompt grub>
      **** Again combine these commands:
      Code: Select all
      # apt-get update && apt-get -y install dmraid && apt-get install -y grub && mkdire /boot/grub && cp /usr/lib/grub/x86_64-pc/* /boot/grub/ && grub --no-curses

        1. grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five
        2. grub> find /boot/grub/stage1
        OUTPUT:
        Code: Select all
        find /boot/grub/stage1
        (hd0,4)

        -- make a note of the output from this command it will be needed later. in my case I have my linux partition as the first extended partition you most likely will have different results (remember that grub starts partition numbers in zero, so partition 5 for linux is partition 4 for grub).
        3. grub> root (hd'x','x')
        -- replace 'x' with the partition number from the previous step
        4. Install grub on your disk (or partition if you prefer boot your computer with another boot manager)
        1. grub> setup (hd'x')
        -- replace 'x' with the values gathered in the previous step
        or
        -- grub> setup (hd'x','x') to install grub on the partition. (YOU WILL NEED ANOTHER BOOT MANAGER TO START YOUR COMPUTER)
        5. grub> quit
      13. # update-grub
      -- say yes to creating a menu.lst
      14. now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano
      # nano /boot/grub/menu.lst
        1. Change
        Code: Select all
        # groot=(hd0,0) TO # groot=(hd0,'x')

        -- root option in the boot entries to root (hd0,'x') Replace the 'x' with the partition that was found earlier
        2. Add the Windows boot entry if need be.
        Code: Select all
        title                 Windows
        rootnoverify (hd0,0)   # use the correct partition for Windows, of course
        makeactive
        chainloader +1

        3. Save and exit nano. or what ever text editor you are using.
      15. # update-grub
      -- make sure the new install of Linux Mint loads the raid module kernel

        1. # echo dm-raid4-5 >> /etc/initramfs-tools/modules
        2. # update-initramfs -u
        3. # nano /etc/modules
        -- and add 'dm-raid4-5' if not exists
Reboot and verify both Ubuntu and the existing Windows partition boot if Windows is installed.

If you run into any errors using the combined commands you will need to enter each line individually. Some might say already mounted, just move onto the next one. This is that way I did it. I found it a little quicker. Tested and working in Linux Mint 7 Gloria.
webslave
Level 1
Level 1
 
Posts: 14
Joined: Thu Aug 13, 2009 12:35 pm

Linux Mint is funded by ads and donations.
 

Re: How to: Setup RAID in Linux Mint 7 Gloria

Postby Husse on Mon Aug 17, 2009 8:08 am

Welcome to Mint and thanks for the guide
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 11 guests