Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Software RAID 0 HOW-TO
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Naughtyus
Guru
Guru


Joined: 14 Jul 2002
Posts: 463
Location: Vancouver, BC

PostPosted: Thu Sep 16, 2004 7:15 am    Post subject: Reply with quote

I'm having problems with my linear raid setup that perhaps someone here might be able to help me with.

My raidtab is as follows:
Code:
#
# linear RAID setup, with no spare disks:
#
raiddev /dev/md0
    raid-level                linear
    nr-raid-disks             2
    persistent-superblock     1
    chunk-size                32

    device                    /dev/hda3
    raid-disk                 0
    device                    /dev/hdb1
    raid-disk                 1


This works without error when booting to the LiveCD. When I am done installing the system, and reboot, the raid drive is never detected.

Code:
VFS: Cannot open root device "md0" or unknown-block(0,0)
Please append a correct "root=" option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)


I'm running a 2.6.8 kernel with all of the raid options compiled into the kernel, and am running udev. I've tried using '/dev/md/0' instead of '/dev/md0', with the same result.

Any suggestions? Will this work if I use a 2.4 kernel? devfs?
Back to top
View user's profile Send private message
tmadhavan
n00b
n00b


Joined: 26 Aug 2003
Posts: 59
Location: South Wales

PostPosted: Fri Sep 17, 2004 4:09 pm    Post subject: Reply with quote

I've just set up a RAID-0 on my two 40GB Maxtors (btw, performance increase from 40MB/sec to 65MB/sec - shouldn't it be nearer 80???).

I compiled my kernel with genkernel, so had to add
Code:
image=/boot/kernel-2.6.8-gentoo-r3
        label=gentoo
        read-only
        append="init=/linuxrc real_root=/dev/md/0"
        root=/dev/ram0
        initrd=/boot/initrd-2.6.8-gentoo-r3

to my lilo.conf.

Also, in lilo.conf and in fstab, I had to change the device name from
Code:
/dev/md0
to
Code:
/dev/md/0
even tho in my raidtab it's md0.

Here's my raidtab:

Code:

raiddev /dev/md0
raid-level 0
nr-raid-disks 2
chunk-size 4
persistent-superblock 1
device /dev/hda3
raid-disk 0
device /dev/hdc3
raid-disk 1


Not sure if that'll help at all, hope it does.

GL,
T
_________________
Tell me and I forget. Show me and I remember.
Involve me and I understand.
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Thu Dec 09, 2004 6:39 pm    Post subject: Reply with quote

Thanks for the how-to. I've never done this before, and I got raid0 up running in five minutes.
_________________
Allting har en ende, pølsen den har to.
Back to top
View user's profile Send private message
TrainedChimp
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2004
Posts: 87
Location: Just west of Earth

PostPosted: Wed Dec 29, 2004 5:20 pm    Post subject: Reply with quote

Thanks for the HowTo. All went very well for me except that I had to manually create the md* devices, maybe that's becaue I'm running "pure" udev...

Before:
Code:
# hdparm -Tt /dev/hda
/dev/hda:
 Timing cached reads:   2792 MB in  2.00 seconds = 1394.12 MB/sec
 Timing buffered disk reads:  172 MB in  3.00 seconds =  57.32 MB/sec


After:
Code:

# hdparm -Tt /dev/md0
/dev/md0:
 Timing cached reads:   2800 MB in  2.00 seconds = 1398.12 MB/sec
 Timing buffered disk reads:  348 MB in  3.01 seconds = 115.48 MB/sec
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Thu Dec 30, 2004 12:19 am    Post subject: Reply with quote

How do you manually create the /dev/md* devices? I'm having the same problem.

-Jeff
Back to top
View user's profile Send private message
TrainedChimp
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2004
Posts: 87
Location: Just west of Earth

PostPosted: Thu Dec 30, 2004 12:29 am    Post subject: Reply with quote

jkcunningham wrote:
How do you manually create the /dev/md* devices? I'm having the same problem.

-Jeff


Code:
cd /dev
mkdir /dev/md
mknod /dev/md/0 b 9 0
mknod /dev/md/1 b 9 1
mknod /dev/md/2 b 9 2
...etc.
ln -s md/0 md0
ln -s md/1 md1
ln -s md/2 md2
...etc.


Or you could emerge mdadm which has a way to force the creation of the devices as it does a 'makeraid'.

Good luck.
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Thu Dec 30, 2004 1:25 am    Post subject: Reply with quote

Hey, thanks for the fast reply. Got it. And I discovered that you can get the "scary messages" to go away entirely if you put the persistent-superblock line before the chunksize line. Apparently, when the man page says:
Quote:

The order of items in the file is important. Later raiddev entries can use earlier ones (which allows RAID-10, for example), and the parsing code isn't overly bright, so be sure to follow the ordering in this man page for best results.

it isn't kidding.

This is great!
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Thu Jan 06, 2005 12:23 pm    Post subject: Reply with quote

I tested the speed of my new md0-device the other day, and the performance results was a little different than I would expect:
I run two seagate barracuda 60 GB disks:
Quote:
/dev/hde:
Timing cached reads: 1100 MB in 2.00 seconds = 549.81 MB/sec
Timing buffered disk reads: 110 MB in 3.04 seconds = 36.20 MB/sec

Quote:
/dev/hdf:
Timing cached reads: 1108 MB in 2.00 seconds = 552.70 MB/sec
Timing buffered disk reads: 118 MB in 3.03 seconds = 38.99 MB/sec

And the md0-device:
Quote:
/dev/md0:
Timing cached reads: 1104 MB in 2.01 seconds = 550.43 MB/sec
Timing buffered disk reads: 66 MB in 3.03 seconds = 21.77 MB/sec

The md0 seems to be remarkably slower than each of the two disks which makes the array. DMA is turned on. In any case the md0 should be faster than the two disks independently regardless of the state of the DMA..
_________________
Allting har en ende, pølsen den har to.


Last edited by stig on Fri Jan 07, 2005 7:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Fri Jan 07, 2005 4:39 pm    Post subject: Reply with quote

That is curious.

How do you have these hooked up to your mother board? Are they both on the same IDE controller? If on separate controllers, are they both masters or slaves (or one each)? Are these SATA drives?
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Fri Jan 07, 2005 5:17 pm    Post subject: Reply with quote

They're master and slave on the same IDE-controller.
Code:
0000:00:0c.0 RAID bus controller: Promise Technology, Inc. PDC20265 (FastTrak100 Lite/Ultra100) (rev 02)

I used this controller in "hardware" RAID when I used the 2.4 kernel series, and the speed then was greatly improved. Still same physical configuration in respect to how the drives were attatched.
_________________
Allting har en ende, pølsen den har to.
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Sat Jan 08, 2005 1:54 am    Post subject: Reply with quote

Hmmm. If they are both on the same cable, then it is by definition a serial event with respect to the two drives (i.e. one gets to write a byte, then the other, etc.). You should try putting them on two different controllers. All modern motherboards have two controllers. Switch stuff around so they are separated and I'll bet you see a big improvement.

-Jeff
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Tue Jan 18, 2005 3:51 pm    Post subject: Reply with quote

Hm. Now ALL disks are on separate cables, but the result is still terrible:
Code:
/dev/hdf:
 Timing buffered disk reads:  122 MB in  3.03 seconds =  40.24 MB/sec

Code:
/dev/hdg:
 Timing buffered disk reads:  122 MB in  3.04 seconds =  40.18 MB/sec

Code:
/dev/md0:
 Timing buffered disk reads:  116 MB in  3.01 seconds =  38.57 MB/sec

_________________
Allting har en ende, pølsen den har to.
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Tue Jan 18, 2005 4:50 pm    Post subject: Reply with quote

I don't know what to make of that. You are running raid-0, right?
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Tue Jan 18, 2005 8:26 pm    Post subject: Reply with quote

Indeed I am :)
_________________
Allting har en ende, pølsen den har to.
Back to top
View user's profile Send private message
Hoshimaru
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 225
Location: Belgium

PostPosted: Mon Jan 24, 2005 1:51 pm    Post subject: Reply with quote

My motherboard is screwed... Is there a way I can access my md raid 0 with the livecd ? I need to get some data stored on these disks.

I guess booting the system with the old kernel for my former motherboard is a no go :S

I'm so screwed now 8O
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Sat Feb 05, 2005 3:47 pm    Post subject: Reply with quote

i have a software raid0 i setup on a fasttrack that is now running on an ich5. i didnt use the fasttrack formatter thing in the bios, so my boot partition is ext2 on only one of the disks.
in order for your kernel to mount these software raids, you need to add
md=0,/dev/sda2,/dev/sdb2 root=/dev/md0
and it will read the raidtab and gentoo will mount drives that are not the root although you might be able to pass those to the kernel too.

the bios has the option to load up raid w/ or w/out a bootPROM? ive never heard of this before. im wondering if there would be more speed/less cpu with bootPROM. if i try to boot this way it doesn't boot grub. i could boot the system off of another disk but i dont know if this will work or not.
sda and sdb are 2 80gb barracuda's with the new command caching but my mb doest support it and 16k chunks. Timing buffer-cache reads are 2000 for raid or a boot partion. Timing buffered disk reads ~50-70 on the boot part and 100-113 on the raids. kernel cpu times are very high on one prossesor during tests.
Back to top
View user's profile Send private message
jackxh
n00b
n00b


Joined: 15 Jan 2005
Posts: 9
Location: LA

PostPosted: Sun Feb 06, 2005 2:42 am    Post subject: even on idle raid1 or raid0 is using a lot of CPU like 80/90 Reply with quote

Hi Everyone:

First thing. It is an exerecllent how-to.

I followed it to setup the raid1 on this. Everything works. I use kernel 2.6.9.
/ reiserfs. AMD 2000, 512 RAM. Gigabyte MB.

the system boots up. But it is very very slow. Like even when I type return key. It takes .5 sec to respond.

when I do top, I see 80 to 95 CPU use by raid related executeables.

Can anyone please give me a hiting. If I need to configure anything.

Jack
Back to top
View user's profile Send private message
Hoshimaru
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 225
Location: Belgium

PostPosted: Sun Feb 06, 2005 12:05 pm    Post subject: Reply with quote

Appearantly I could boot the system with the new motherboard. I made a backup to another computer and I'm going to install it from scratch again... if I'm able to see the hard disks attached to a HPT372 RAID controller at least :roll:
Back to top
View user's profile Send private message
Phk
Guru
Guru


Joined: 02 Feb 2004
Posts: 428
Location: [undef], Lisbon, Portugal, Europe, Earth, SolarSystem, MilkyWay, 23Q Radius, Forward Time

PostPosted: Fri Mar 04, 2005 9:30 am    Post subject: Reply with quote

Hi there!

I'm getting mad on trying to put raid 0 working.... :cry:

I'm able to make /dev/md0,
i'm able to do fdisk /dev/md0 and create partitions,
but......
How can i format now a single partition? if my raid (/dev/md0) had two partitions, how could i access each individually?

Please clear my mind or i'll reject technology from now on... :D
_________________
"# cat /dev/urandom >> /tmp/life"
Back to top
View user's profile Send private message
Hoshimaru
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 225
Location: Belgium

PostPosted: Fri Mar 04, 2005 11:30 am    Post subject: Reply with quote

Why on earth would you want to format individual partition from your /dev/md0 ?
Just format the md0...

fdisking it ? For what purpose ? Once you fdisked 2 or more hard disk and build your mdraid device on a specific partition of all the drives it should be ok.

If you absolutely have to, just mk2fs /dev/hdX or sdX for example.
Back to top
View user's profile Send private message
Phk
Guru
Guru


Joined: 02 Feb 2004
Posts: 428
Location: [undef], Lisbon, Portugal, Europe, Earth, SolarSystem, MilkyWay, 23Q Radius, Forward Time

PostPosted: Fri Mar 04, 2005 6:23 pm    Post subject: Reply with quote

Ok! So /dev/md0 is the first partition, not the raid itself.......

So my question is:
if i need to partition each drive individually, i don't need the raid mode set in the motherboard, right? If so, how can i have raid working on linux+windows?

I'm gettin confused...
_________________
"# cat /dev/urandom >> /tmp/life"
Back to top
View user's profile Send private message
Hoshimaru
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 225
Location: Belgium

PostPosted: Fri Mar 04, 2005 11:06 pm    Post subject: Reply with quote

Depends on the raid you want.
If you are going to use hardware raid, you need to create the array in your controller's bios and load the correct LKM. The access the raided devices with /dev/ataraid/dXpX, or /dev/sda or other namings... depends on the module. Then it's just partitioning and formatting as if you were using a regular hard disk.

If you want to use linux software raid or (mdraid/mdadm) you might want to check this out: https://forums.gentoo.org/viewtopic-p-2053078.html#2053078

It's for using with a HPT372, but that more or less the same for the rest.
Back to top
View user's profile Send private message
zpet731
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2004
Posts: 133
Location: Sydney Australia / Belgrade Serbia

PostPosted: Wed Mar 30, 2005 3:07 pm    Post subject: Reply with quote

Hi everyone,

Just wanted to know if these instructions are still current and are they the same for SATA RAID 0. Also I would like to mention that I just put a system together with GA-K8NF-9 and have two 160GB seagate HD. Now when I boot the bios asks me to setup the raid array. So if Im only using linux I should use software raid right? Does this mean that I should disable the raid for my to SATA drives within the bios.

Thanks!!
_________________
" Invention is the most important product of man's creative brain. The ultimate purpose is the complete mastery of mind over the material world, the harnessing of human nature to human needs."
Nikola Tesla
Back to top
View user's profile Send private message
Phk
Guru
Guru


Joined: 02 Feb 2004
Posts: 428
Location: [undef], Lisbon, Portugal, Europe, Earth, SolarSystem, MilkyWay, 23Q Radius, Forward Time

PostPosted: Wed Mar 30, 2005 3:52 pm    Post subject: Reply with quote

Hi there.

I've managed to build a similar system up, but i've spent 2 weeks making a huge pile of sh*t.
So, i encourage you to follow this:
https://forums.gentoo.org/viewtopic-p-2220169-highlight-.html#2220169
Instead of spending 2 weeks like i did.

(you will basicly only need the gen2dmraid-0.99a.iso. Instructions at the link i gave)
_________________
"# cat /dev/urandom >> /tmp/life"
Back to top
View user's profile Send private message
zpet731
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2004
Posts: 133
Location: Sydney Australia / Belgrade Serbia

PostPosted: Wed Mar 30, 2005 4:51 pm    Post subject: Reply with quote

Hey Phk,

If the above note was inteded to me, then I need to ask you should I be using the RAID within the motherboard or just stick to software raid. Im running ONLY linux.
_________________
" Invention is the most important product of man's creative brain. The ultimate purpose is the complete mastery of mind over the material world, the harnessing of human nature to human needs."
Nikola Tesla
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum