# No hard drives recognized on PowerEdge 2850 (PERC4ei RAID)

## nathanodle

Just resolved a problem that I think others might want to know about.  Although I have given some step-by-step here, it's best to read through them completely and understand what you're doing and why before just hauling off and typing in commands recipe-book style  :Smile: 

Symptom:

Gentoo 2004.2 LiveCD doesn't recognize the Dell PowerEdge 2850 RAID controller, hence no /dev/sda, etc. shows up.

Discussion (how I fixed it):

I just received a PowerEdge 2850 rack-mount server.  This server uses Dell's PERC4ei (alternate spellings for search:  PERC 4/ei, PERC4/ei, PERC4 EI, PERC 4ei) RAID controller, which is essentially a rebadged LSI MegaRAID.  After much research, I finally located the following in a mailing list post from Matt Domsch (a Linux type at Dell):

 *Quote:*   

> New embedded ROMB (the 'i'), U320 (hence the 4) and PCI-Express (the 'e'), which happens to be based on LSI megaraid (yes, uses megaraid2 driver).

 

What this told me is that I needed to somehow get ahold of the latest LSI MegaRAID driver, patch it into a LiveCD kernel, compile it on an existing Gentoo rig, then scp it over to the new box and load it.  What follows is a brief step-by-step of how I accomplished this.

1.  Locate an operational Gentoo installation.  This is required to download and compile the Gentoo development kernel source code.

2.  On the OPERATIONAL Gentoo box, emerge the gentoo-dev-sources-2.6.7-r11 ebuild.  You may have to do an 'emerge sync' if it's been awhile.  Then issue 'emerge gentoo-dev-sources-2.6.7-r11' and wait.  This is what the 2004.2 LiveCD is using if you boot with the "smp" kernel option.  This will get you a kernel source directory under /usr/src/linux-2.6.7-gentoo-r11.

3.  From the LiveCD shell prompt on the NEW Gentoo box, create a root password by issuing the command 'passwd root'.

4.  Start SSH on the NEW Gentoo box with '/etc/init.d/sshd start'.  This is necessary because we will be using scp to move over the new MegaRAID drivers.

5.  Using scp, copy the LiveCD kernel config to the kernel source directory on the OPERATIONAL Gentoo box.  To do this, issue the following command on the OPERATIONAL Gentoo box:  'scp root@[ip address of NEW Gentoo box]:/proc/config.gz /usr/src/linux-2.6.7-gentoo-r11'.  Enter the password from Step 3 when asked.  Then gunzip the file with 'gunzip /usr/src/linux-2.6.7-gentoo-r11/config.gz'

4.  Download the latest MegaRAID unified driver from the LSI's FTP site to a temporary directory on the OPERATIONAL Gentoo box.  As of this writing, it can be found at:  

ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-unified-2.20.0.B2.04.14.2004/.  What you want to download is the "megaraid-b2-lk2.6.5.patch.gz" file.  It may also be worth jumping up a directory to see if there have been any more recent releases.  If so, download the patch file that can be found in that directory.

5.  While in the /usr/src/linux-2.6.7-gentoo-r11/ directory on the OPERATIONAL Gentoo box, issue the following command to patch the kernel with the new MegaRAID2 driver:  'patch -p1 < [path to the downloaded patch file]'.

6.  Then on the OPERATIONAL Gentoo box, configure the kernel with 'make menuconfig' while in the /usr/src/linux-2.6.7-gentoo-r11/ directory.  When the menu comes up, scroll down and select "Load an Alternate Configuration File".  For the name of the configuration file, use the one you copied over - '/usr/src/linux-2.6.7-gentoo-r11/config'.  Then compile the kernel and modules with 'make bzImage modules modules_install'

7.  Copy your brand new shiny MegaRAID2 modules over by issuing the following command on the OPERATIONAL Gentoo box:  'scp -r /usr/lib/modules/2.6.7-gentoo-r11/kernel/drivers/scsi/megaraid root@[ip address of NEW Gentoo box]:/root'.  Enter the password from Step 3 when asked.

8.  Insert the modules manually on the NEW Gentoo box by typing 'insmod /root/megaraid/megaraid_mm.ko' and then 'insmod /root/megaraid/megaraid.ko'

9.  At this point, you should be able to do an 'ls /dev/sd*' and get a listing of some SCSI devices corresponding to your PERC4ei configuration.  If not, either you or I have missed a step along the way  :Smile: 

It's also VERY MUCH worth noting that when you get along to the kernel compilation step of your Gentoo installation, you'll need to patch your kernel in the same way as you did when following these instructions.  The reason for this is, that you had to compile the kernel/modules on the existing box to get a set of modules specific to the LiveCD kernel.  You'll need to do it all again for the kernel you actually plan on installing.

Perhaps someone in Gentoo-land can try and add this kernel patch to the next LiveCD?  I am willing to bet that enough of these PowerEdge 2850s are floating around to make it worthwhile  :Smile: 

P.S.  Hope this is all correct, I typed this as I was doing the whole thing so it should be accurate.  If not, feel free to reply and tell me.Last edited by nathanodle on Wed Sep 01, 2004 1:19 pm; edited 1 time in total

----------

## rojaro

Nice HowTo. You should file a Featurerequest for this at bugs.gentoo.org. The devs usually only implements whats being requested there.

----------

## complich8

I just got a brand spankin' new Dell Poweredge 2800.

Same symptom: Perc 4e/Di card would work in scsi mode, but not with hardware raid mode on.

Same cure.

Thanks for doing the legwork!  You saved me a lot of frustration.  :Smile: 

----------

## syncops

Just got my new poweredge 2850 server today.

<edit>

Bug 62508  shows that this issue if resolved & fixed, my thanks go out to nathanodle and the Gentoo LiveCD Team for resolving this issue !

</edit>

Syncops

----------

## syncops

I was so happy that the bug was resolved and fixed I didn't read al the comments there.

I do not have a working gentoo install available. Does this mean I have to wait for the 2004.3 liveCD ??

Maybe someone could just post a modified liveCD ?

I was planning to use a stage 1 minimal CD.

thanks in advance,

Syncops

----------

## complich8

I can give you the modules I used when I did mine, I've still got them lying around...

working megaraid modules at:

< edit by complich8 on 2005-02-16: link pulled, because you should just use the 2004.3 livecd nowadays  :Smile:  > .

md5sum= 47492fcd0bafe5053e8267b5ad0f3d6d

they're what I used for my 2800.  from /root on the livecd you should be able to wget that, tar xzvf, cd megaraid, insmod megaraid_mm.ko, insmod megaraid.ko 

I think.

let us know if it works for ya.

----------

## syncops

seems to work, /dev/sda is present and attached.

Notice from sda:

- asking for cache data failed

- assuming drive cache: write through

I'm going to continue the install now, thx complich8 for providing me with compiled modules.

Syncops

----------

## voltairien

The 2004.3 liveCD boot and recognize the SCSI drive now...

When i reboot (after install) on the hard drive (/dev/sda), i've got the error message :

"Cannot open root device "803" or unknown block (8,3)" and so a kernel panic...

But i have include the support for MegaRAID in my kernel (not in module, in kernel)...

What's wrong ?

----------

## voltairien

Oups ... I have forgot MPTFusion ... 

So it works.

----------

## flickerfly

I have MPT Fusion in the kernel and the "Next Generation" megaraid drivers. The correct filesystem is built-into the kernel.

The kernel panics with the message:

```
not syncing: VFS: Unable to mount root fs on unknown-block(8,3)
```

Any ideas on what I'm missing? Should I post my config?

----------

## voltairien

I don't know if is important, the LSI Support :

In Device Driver -> SCSI Device support -> SCSI low-level drivers  :

        [*] LSI Logic New Generation RAID Device Drivers                                      

        <*>   LSI Logic Management Module (New Driver)                                        

         <*>     LSI Logic MegaRAID Driver (New Driver)    

?

----------

## smonijhay1

good to know since most of our servers at the job are power edges.  I think 2 of them are running gentoo but a few more are slated to.

----------

## flickerfly

I messed around with the kernel config some more and it is working now. Unfortunately, I can't put my finger on what it was but may have been related to removing some uneeded IDE stuff.

----------

## thething

 *flickerfly wrote:*   

> I messed around with the kernel config some more and it is working now. Unfortunately, I can't put my finger on what it was but may have been related to removing some uneeded IDE stuff.

 

I found the fix for this after about 6 kernel rebuilds: I stumbled into the Device Drivers > Multi-Device Support > area and noticed the raid drivers were set to be built as modules.  Change the required drivers to built in.  On a new dell poweredge 2850 at raid 1, I changed  the "Raid Support", "Linear Mode" (i don't believe it is needed), and "Raid 1"to be built in to the 2.6.9-r13 kernel.

----------

## flickerfly

 *thething wrote:*   

>  *flickerfly wrote:*   I messed around with the kernel config some more and it is working now. Unfortunately, I can't put my finger on what it was but may have been related to removing some uneeded IDE stuff. 
> 
> I found the fix for this after about 6 kernel rebuilds: I stumbled into the Device Drivers > Multi-Device Support > area and noticed the raid drivers were set to be built as modules.  Change the required drivers to built in.  On a new dell poweredge 2850 at raid 1, I changed  the "Raid Support", "Linear Mode" (i don't believe it is needed), and "Raid 1"to be built in to the 2.6.9-r13 kernel.

 

I made the mistake of modularizing disk related drivers enough times that I'm sure that wasn't the case for me this time. That was my biggest issue when building my first kernel and I learned my lesson

----------

