Page 1 of 1

How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Thu Dec 25, 2008 10:43 pm
by hotweiss
http://seethisnowreadthis.com/2008/12/2 ... /#more-129

1. Go into your motherboard’s BIOS and turn on the RAID support

2. Go into your RAID’s BIOS and set-up your RAID partition

3. Boot the Live CD

4. Open Terminal and type the following:

Code: Select all

sudo apt-get install dmraid
5. Once completed the above installation, type the following:

Code: Select all

sudo modprobe dm-raid4-5
6. Now it’s time to install Linux Mint

7. Upon reaching the partition menu, select your RAID partition

8. Upon reaching the install confirmation menu, click on the Advanced button and uncheck install boot loader

9. Once the installation is completed, check your partitions by typing the following in Terminal:

Code: Select all

cd /dev/mapper
and then:

Code: Select all

dir
10. Copy the partition without a number; I will use dabdgddgLinuxFTW as an example

11. Now we have to see how the partitions are set-up, so type the following in Terminal:

Code: Select all

sudo fdisk dabdgddgLinuxFTW
12. Type p in Terminal to see the actual partitions:

13. Note and copy which partition is the Linux partition (the other ones you will see is extended and swap); I will usedabdgddgLinuxFTW1 as an example

14. Type q in Terminal to exit fdisk

15. Now we have to mount the RAID partition in order to set-up grub by typing the following in Terminal:

Code: Select all

sudo mount dabdgddgLinuxFTW1 /target
and

Code: Select all

sudo mount --bind /dev /target/dev
and

Code: Select all

sudo mount -t proc proc /target/proc
and

Code: Select all

sudo mount -t sysfs sys /target/sys
16. Now we have to set-up grub by typing the following in Terminal:

Code: Select all

sudo chroot /target
and

Code: Select all

apt-get install dmraid
and

Code: Select all

apt-get install grub
and

Code: Select all

mkdir /boot/grub
and

Code: Select all

cp /usr/lib/grub/i386-pc/* /boot/grub
and

Code: Select all

grub --no-curses
and

Code: Select all

device (hd0) /dev/mapper/dabdgddgLinuxFTW
and

Code: Select all

root (hd0,0)
and

Code: Select all

setup (hd0)
and

Code: Select all

quit
and

Code: Select all

update-grub
(press y when asked to confirm)

17. Finally reboot.

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Fri Jan 09, 2009 2:58 pm
by LaneH
This is an excellent tutorial and works perfectly, however; has anyone had this issue:
Start the computer, Grub loads, ERROR COMRESET FAILED on a drive or two, etc. Give it about 10-20 seconds to get more of the same errors on different drives, type exit and everything starts up as it should.

I'm using an NVRaid, 3 disks in Raid5 configuration, and I have an 3 disk enclosure and while I'm getting these errors the access light is solid on the disk it's going on about.

Is there a workaround? Somehow, telling grub to load the disks but wait about 20 seconds before trying to boot?

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Fri Jan 09, 2009 6:35 pm
by hotweiss
LaneH wrote:This is an excellent tutorial and works perfectly, however; has anyone had this issue:
Start the computer, Grub loads, ERROR COMRESET FAILED on a drive or two, etc. Give it about 10-20 seconds to get more of the same errors on different drives, type exit and everything starts up as it should.

I'm using an NVRaid, 3 disks in Raid5 configuration, and I have an 3 disk enclosure and while I'm getting these errors the access light is solid on the disk it's going on about.

Is there a workaround? Somehow, telling grub to load the disks but wait about 20 seconds before trying to boot?
What do you get when you type this in:

Code: Select all

grub --no-curses

Code: Select all

find /boot/grub/stage1

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Sat Jan 10, 2009 4:13 pm
by LaneH
Inside of Mint:
grub> find /boot/grub/stage1
Error 15: File not found

But, when I did run the command from installation it showed (hd0,0)

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Sat Jan 10, 2009 4:28 pm
by hotweiss
LaneH wrote:Inside of Mint:
grub> find /boot/grub/stage1
Error 15: File not found

But, when I did run the command from installation it showed (hd0,0)
Well that part seems to be OK. RAID 5 support is relatively new to dmraid... I really don't know where to go from here myself?

You could try compiling the new version:

http://people.redhat.com/~heinzm/sw/dmraid/src/

...or you can even try contacting the author.

Edit: trying to upgrade to 1.0.0.rc15 killed my system

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Sat Jan 10, 2009 4:38 pm
by LaneH
It works well enough, it's just that little annoying hang time at boot.

Thanks for your help, though!

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Sat Jan 10, 2009 9:24 pm
by hotweiss
LaneH wrote:It works well enough, it's just that little annoying hang time at boot.

Thanks for your help, though!
Actually do not try to upgrade dmraid, I just killed my system :(

Edit: I fixed my system by downgrading back to 1.0.0.rc14 using the live CD.

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Wed Jan 14, 2009 7:46 pm
by LaneH
Thanks for the warning!

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Wed Feb 04, 2009 7:47 pm
by Guest
Hello,

Thanks for the wonderful guide.
It works great.

However for people using 64 Bit version of Mint and other Linux just change the line below

cp /usr/lib/grub/i386-pc/* /boot/grub

I cant remember the exact line (not in front of me .. at work)

cp /usr/lib/grub/x64-pc/* /boot/grub ...

Worked great for my Ich9r thanks heaps

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Wed Feb 04, 2009 8:43 pm
by Fred
And what are the advantages in doing this again? I seem to have forgotten. :-)

Fred

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Tue Mar 03, 2009 2:48 pm
by hotweiss
Fred wrote:And what are the advantages in doing this again? I seem to have forgotten. :-)

Fred
Your hard drive should be twice as fast now. You really do notice a performance increase with RAID 0.

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Tue Mar 03, 2009 3:53 pm
by Fred
hotweiss,

I have never seen that statement work out in real life load situations, but I am sure you really do believe that. It is a good differentiator and there has been a lot of marketing effort exerted to convince the public of its' virtues. If you are happy with it then that is ok by me. :-)

Couple of things to look at some time when you have the spare time. Look at how the benchmarks are done when these fantastic speed gains are recorded. Google the vast hordes of horror stories on the net about lost data and botched recovery efforts when you have a disk problem. Cypher out for yourself why anybody would pay 3 or 4 times the cost of a good motherboard with this type RAID on it for true hardware RAID that will supposedly only give you marginally better performance.

Just a few thoughts. :-)

Fred

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Mon May 11, 2009 4:24 pm
by marcus0263
Fred wrote:hotweiss,

I have never seen that statement work out in real life load situations, but I am sure you really do believe that. It is a good differentiator and there has been a lot of marketing effort exerted to convince the public of its' virtues. If you are happy with it then that is ok by me. :-)

Couple of things to look at some time when you have the spare time. Look at how the benchmarks are done when these fantastic speed gains are recorded. Google the vast hordes of horror stories on the net about lost data and botched recovery efforts when you have a disk problem. Cypher out for yourself why anybody would pay 3 or 4 times the cost of a good motherboard with this type RAID on it for true hardware RAID that will supposedly only give you marginally better performance.

Just a few thoughts. :-)

Fred
Agreed, software RAID is flaky at best, not worth the hassel IMO. Me I just slice up the drives the plain old fashioned way, If I want RAID I'll pony up for the hardware and save myself the headache of software along with the risk.

Cheers

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Tue May 12, 2009 12:33 pm
by gevans
This walkthrough was exactly what I needed. thanks :)

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Thu Aug 13, 2009 1:18 pm
by webslave
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.

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felicia)

Posted: Wed Feb 24, 2010 5:58 pm
by Fluxcored
webslave wrote: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...
Works verbatim with Mint 8 Helena guided installation.

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felici

Posted: Fri Feb 25, 2011 11:23 am
by Jupiter_Spunk
Newbie here. Just installed Mint yesterday. Wish I had seen this before hand.

Heres my question.
I have a PCI IDE raid card that I'm running Raid 1 (mirroring with 2 320gb drives partitioned and formatted NTFS with tons of precious photos)

Can this be setup after a mint install. Shouldn't I be able to install the driver for the IDE card and then mint just picks up the partition?

1. How do I check to see if the drive is installed (dmesg will show me the hardware l pci will show me whats on the pci port how do I know if the driver is installed or not?)

2. If the driver is not installed how do I go about doing so?

3. If the driver is installed, what do I need to do for it to see the NTFS partitions (it natively picks up my other drives with NTFS)

Any help appreciated, Thanks!

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felici

Posted: Sun Aug 28, 2011 5:06 am
by javierpeces
Unfortunately trapped in a similar problem installing Linux Mint 11 in a VIA8237A RAID device. Grub error at the very end of the installation process. Solved using the information shown in this thread with small adaptation. This is the way I did. Hope it will help.

DISCLAIMER: You may leave your system unusable unless you know what you are doing. Anyway, the installation program has left it in a bad state for you by now.

1. Finish the installation program without installing grub. Do not reboot.

2. Open a terminal window

3. Find the name of your device mapper using ls

Code: Select all

 $ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 2011-08-28 10:38 control
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd -> ../dm-0
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd1 -> ../dm-2
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd2 -> ../dm-3
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd5 -> ../dm-4
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd6 -> ../dm-5
lrwxrwxrwx 1 root root       7 2011-08-28 10:38 via_dgbbcicjfd7 -> ../dm-6
My computer's device name is /dev/mapper/via_dgbbcicjfd

4. List your disk partitions with sudo fdisk -l

Code: Select all

$ sudo fdisk -l /dev/mapper/via_dgbbcicjfd

Disk /dev/mapper/via_dgbbcicjfd: 640.1 GB, 640145865728 bytes
255 heads, 63 sectors/track, 77826 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x28dad5fc

                     Device Boot      Start         End      Blocks   Id  System
/dev/mapper/via_dgbbcicjfd1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/mapper/via_dgbbcicjfd2              13       12749   102297600    7  HPFS/NTFS
/dev/mapper/via_dgbbcicjfd3           12749       77827   522739713    5  Extended
/dev/mapper/via_dgbbcicjfd5           77436       77827     3141632   82  Linux swap / Solaris
/dev/mapper/via_dgbbcicjfd6           12749       77045   516454400   83  Linux
/dev/mapper/via_dgbbcicjfd7           77045       77436     3139584   82  Linux swap / Solaris

Partition table entries are not in disk order
Partition 6 holds my Linux Mint data.

5. Mount and chroot to Mint partition:

Code: Select all

mint@mint ~ $ sudo mount -t ext4 /dev/mapper/via_dgbbcicjfd6 /target
mint@mint ~ $ sudo mount --bind /dev /target/dev
mint@mint ~ $ sudo mount -t proc proc /target/proc
mint@mint ~ $ sudo mount -t sysfs sys /target/sys
mint@mint ~ $ sudo chroot /target
6. Install grub to the device mapper, NOT to the Mint partition:

Code: Select all

mint / # grub-install /dev/mapper/via_dgbbcicjfd
Installation finished. No error reported.
7. Build grub information:

Code: Select all

mint / # update-grub
Generating grub.cfg ...
Found background image: linuxmint.png
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/mapper/via_dgbbcicjfd1
done
8. Cross fingers and restart. Eject CD and press enter key when asked to do so.

Good Luck!

Re: How To Set-Up Soft RAID (dmraid) in Linux Mint 6 (Felici

Posted: Fri Dec 09, 2011 3:32 am
by marclijour
Thanks. This process works fine with the following extra steps if you are starting from a Linux Mint 12 installation.

Code: Select all

mint@mint ~ $ sudo apt-get install dmraid
This last command will install the dmraid package (missed by the installer), and it will update the initramfs (with the required raid module).

For your information, my hardware configuration:
SONY VAIO VPCZ2290S with 2 SSD drive 2x128GB assembled in RAID 0 (FakeRaid). Nice machine so far. Swap space has not been used thanks to the 8GB of RAM. SSD drives make things quiet and super fast.

Code: Select all

mint  ~ # inxi
CPU~Dual core Intel Core i7-2640M CPU (-HT-MCP-) clocked at 800.000 Mhz Kernel~3.0.0-12-generic x86_64 Up~10 min Mem~631.3/7917.5MB HDD~256.1GB(1.5% used) Procs~171 Client~Shell inxi~1.7.7 
To install Linux Mint 12 on a RAID0 array with two SSD drives, from the live DVD (64 bit), I ran GParted to resize the Windows partition. Then I created an extended partition further partitioned for Mint, swap, data... I then ran the LiveCD install pointing it to the Mint (ext4) partition (mounted on /) and the swap partition. The installation went fine except from GRUB which complained about the boot loader no matter what I tried to make it happy. Although GRUB was installed in the RAID device MBR, it was not able to find the Mint partition at boot time, instead it was dropping me in an initramfs shell. Reinstalling GRUB as stated above and installing dmraid was the solution to my problem.

Reference