# hardware raid

## gohmdoree

for hardware raid on gentoo, is it basically the same instructions to the software raid tutorials?

1. set the raid type on the controller

2. create the nodes for the respective partitions

3. use mdadm to create the array?

----------

## Truin

I could be wrong, but it sounds like you're mixing apples and oranges.

If you have a hardware raid device, then the raid configuration would be done on the device (via direct interface, web, console, telnet, however the device does it), and then LUNs are carved out of the raid array(s) and presented to the host bus adapter, say a scsi contoller.  The LUN would look like a normal block device to the OS, for exmaple, /dev/sdb.  You'd then mkfs on that block device, or partition it, or whatever you're gonna do with it.  It's the dedicated hardware raid device that handles the stripping, mirroring, or whatever, for your raid array(s).

If you're doing software raid, that's where mdadm and the device md device stuff comes in.  Instead of having dedicated hardware to do it, you're using the kernel and associated software drivers to create your raid arrays.

By all means, beat me if I'm way off.  Some more info might be helpful, tho.  :Smile: 

----------

## gohmdoree

Truin, 

Your points made the most sense to me after I wrote that entry.  Never worked with raid before, and all write-ups were based on software raids, or referenced osftware raids.

I came across a wiki (I'll post later at home) that has you start the installer with the dodmraid option.

You can then find the raid device in /dev/mapper.  If all worked well you should see an extended alphanumeric other than a control file.  

It took a reboot for me to actually see the partitions that I had created.

I will post more details later.

----------

## Jaglover

 *Quote:*   

> I came across a wiki (I'll post later at home) that has you start the installer with the dodmraid option. 

 

This is how you build software RAID.

----------

## cyrillic

Not only that, but dmraid is for Windows compatible software RAID.

There is no reason to use dmraid unless you are sharing the array with Windows.

----------

## gohmdoree

Thanks for all of the clarifications.  

Got a new dell server today with perc/5i controller.  Time to wade through this all.

----------

## Cyker

Ah, a PERC!

If you're using that, you just do the Magic Key Combo (CTRL+F1 or something? I forget now... it'll tell you during boot up if you wait a bit) to access the PERC's RAID config mode.

Just set the array up there and that's it.

You don't need to do anything else - Linux will just see it as giant /dev/sda and you just install as you normally would.

It is advisable to compile in the proper PERC drive in the kernel and install the Linux PERC RAID tools 'tho (All this stuff should be on the Dell CDs that come with the server)

----------

## gohmdoree

COOL!

The thing just came in today and the box is enormous.  I think I could nap inside of it during the day without being noticed.

The box at home I'm building is using a promise tx2300 or something.

All a new area but good to know I think.

Thanks for the info.

----------

## Truin

Heh... I've set up many a PERC controller in those Dell PowerEdge boxen.  If you're using an older 2.4 kernel, you might run into problems.  I seem to recall not having kernel modules for one of the "newer-ish" PERC controllers.  But, if you're going 2.6.x, it shouldn't be a problem.  As Cyker pointed out, there's some utils on the Dell setup CD.  I think it might even have modules for the PERC controller and a kickstart builder for doing the initial setup (if you're doing an RHAS/ES or SuSE install.  But, for the love of Geebus, put Gentoo on it, would ya?)    :Laughing: 

It's CTRL-D or CTRL-M, I believe.  Man, it's been a few months, and I just can't remember.  You should be able to either setup the RAID (the PERC BIOS addresses 'em something like A00-00 and A00-01 IIRC), or allow the disks to be seen as individuals to the OS (A00-00, A01-00).  PLEASE, read the docs.  I can't say it enough - it's been a while...  Either way, what the OS will see are normal SCSI block devices, /dev/sdX and the like, so your linux build will be just like normal.  No "software" raid, or mdadm, or /dev/mapper stuff needed.  Your PERC will do all that for ya, as a hardware raid device.

Have fun, and Good Luck!

----------

## gohmdoree

Feedback like this is great.  

I never saw a computer box so big.  I never imagined a computer to big so big either!  Anyhow, Gentoo will go right on this baby, just got to find the time at work to start working on it.

Are folks out there familiar with the Promise Fasttrack TX2300 cards?  I keep reading about "real" raid and real raid.

Thanks for the good info, and I'll look into that PERC documentation before I do anything else.

I am planning on doing a Raid 5 configuration.  Most input from friends suggested as such.  I saw some combination configurations like 5+0, 5+1.  

Kind of fun, since its a new thing.  Never had a need to use Raid.

----------

## gohmdoree

i just compile gentoo as if i had one harddrive?  no need to compile kernel support for raid correct?  since this is handled by the perc/5i controller.

my other machine at home i built with the promise fasttrack tx2300 is going software raid.  following this hardware raid/on bios wiki.  kind of following the same thing, accessing the drives via /dev/mapper/... etc.

----------

## gohmdoree

woah... 

still building my poweredge server, but never saw my toolchain build so fast.  =p

----------

## nixnut

Moved from Installing Gentoo to Kernel & Hardware.

raid stuff, so moved here.

----------

## Cyker

 *gohmdoree wrote:*   

> i just compile gentoo as if i had one harddrive?  no need to compile kernel support for raid correct?  since this is handled by the perc/5i controller.

 

CORRECT!  :Very Happy: 

 *gohmdoree wrote:*   

> still building my poweredge server, but never saw my toolchain build so fast. =p

 

It's, fun a 'proper' server.   :Smile: 

My house one is just the casing of an old mini tower that I just stuffed all my bits into. The Dell and HP servers at work are much more impressive, esp. the insides! They dwarf my poor house one!

Keep curious cats away from them... (They know how to unlock the doors if you leave the key in! Sneaky cats...  :Shocked: )

And the NOISE! Jeez... like a jet air-craft if you don't have the auto-fan controls enabled  :Razz: 

That'll keep the cat out 'tho I guess 'tho, hehehe

----------

## gohmdoree

so, at my first attempt, i saw a drive /dev/sda that was 1TB, which made sense per the Perc5/i controller bios.

on reboot, i got the vfs error, so i figured i was missing a driver somewhere.

i'm trying all over again, since my partitions wouldn't mount anymore.  weird behavior.  i don't know.

what i noticed on bootup, now i can see /dev/sda, /dev/sdb, /dev/sdc.  these are the three 500gb drives that i have.

i did notice a /dev/sdd, which is the size of 1TB.  i'm going to assume that this is my raid 5 array.

sound about right?

----------

## Cyker

 *gohmdoree wrote:*   

> so, at my first attempt, i saw a drive /dev/sda that was 1TB, which made sense per the Perc5/i controller bios.
> 
> on reboot, i got the vfs error, so i figured i was missing a driver somewhere.
> 
> i'm trying all over again, since my partitions wouldn't mount anymore.  weird behavior.  i don't know.
> ...

 

Weird... I didn't think you'd see the individual disks with hardware RAID... maybe the PERC driver is exposing them?

----------

## gohmdoree

thats what i thought.  like i said the first time, i only saw a /dev/sda.  i'm using the 2006.0 installer.  

i reinitialized my array, and i'm seeing the same thing.  this time i actually took notice of the /dev/sdd.  i'm going to assume that this was there before.

something crap out?

----------

## gohmdoree

went through the whole process and on reboot, got stuck at the vfs root error.

installing grub i see sda, sdb, sdc, and sdd which i believe to be my raid.

i set the /boot partition as the bootable, and i have no idea at this point.  lspci shows megaraid_sas, so i have that compiled into my kernel.

i'm also running lvm2 for my non-root/boot partitions.

actually i saw in my grub.conf that i was specifying hd0 and not hd3, which is my /dev/sdd/  giving this a go right now.

----------

## gohmdoree

well that didn't work.  it didn't find grub, so i'm guessing, i got to write to sda's mbr? and roll like that?

----------

## gohmdoree

i tried to manually install grub, and after a failed reboot and into the installer, i only see /dev/sda for 1TB as i did initially.

and it worked, or at least i got father...

well works now... go figure.  

my steps:

1. install grub, when i only saw as /dev/sda

results: failed

2. redid the box, didn't realize there was a /dev/sdd, so reinitialized my raid 5 array

3. install grub to /dev/sda (in grub used (hd0,0)) 

4. tried to install grub to /dev/sdd (in grub used (hd3,0))

results: failed

5. on reboot into the installer, having to vgscan --mknodes and vgchange -a y to see my lvm2 volumes, lo and behold, i see /dev/sda and nothing else.  though sd[abcd] all showed up when i ran grub-install.

6. reboot to correct fstab from sdd entries to sda, and i see /dev/sdd again.

what is going on?  personality problems...

7. rebooted with an fstab that referenced everything as sda, and i'm at my command line.  finally.

i wish i could methodically pin point what i did wrong, but i really can't think of anything.  makes me kind of unsettled that it was just pounding away at iterations of this that it worked.

----------

## Truin

Something is funky, that's for sure.  If you have a RAID configured, the only device(s) you should see from the OS side are the raid devices, not the components that make up the raid.  In other words, if you have all 3 in a 1TB RAID5, all you should see is /dev/sda.  

On the other hand, if you're not doing a raid, and you're just using the PERC as a normal scsi HBA, then you would have sda, sdb, and sdc.    So, sounds to me like either your PERC controller is mental, or the raid isn't being initialized in the PERC after being configured.

In short - you should see one (sda only/raid) or the other (sda/sdb/sdc no raid) but not both.

----------

## gohmdoree

it showed and it didn't.  it works now and works as /dev/sda on boot.

content for now.

----------

