LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How to get SATA card drivers to load before md autodetection? (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-get-sata-card-drivers-to-load-before-md-autodetection-278236/)

The Belgain 01-15-2005 06:54 PM

How to get SATA card drivers to load before md autodetection?
 
Hi there. I'm not quite sure if this is the right forum to post this to... feel free to move it if you want.

Well, I've created a software RAID5 partition on Linux (Slackware 10.0) using the mdadm tools, but the array isn't being recognised on startup (I need to manually re-assemble the array after each reboot to get it recognised).

Now the reason for this is that the array is on a Highpoint SATA controller card, for which I have compiled the drivers (it isn't supported natively), and I load them up during bootup by having added "modprobe hptr1540" to /etc/rc.d/rc.local. The problem is that md detects and mounts arrays before the highpoint driver is loaded, and therefore doesn't see my RAID5 array. How can I get the Highpoint drivers to load before the arrays get detected?

I assume there must be a way to do this, as this is a pretty common thing to be needing to do...

Thanks for the help guys...

Electro 01-15-2005 10:48 PM

Try placing the highpoint module in the ramdisk file. Make sure the module is decompress and you edit a script in the ramdisk file to load the module. You should not place modules that need to be loaded in rc.local. Its better to use /etc/modules.conf, /etc/modprobe.conf, or if you do not know the syntax of those files use /etc/rc.d/rc.modules.

I have not setup RAID yet. I know you are using RAID 5, but read howtos on RAID 0 and RAID 1 setups. You probably get some ideas how to get it working every time you boot in to Linux.

The Belgain 01-16-2005 05:42 AM

Well, I've added the "modprobe hptr1540" line to /etc/rc.d/rc.modules, instead of /etc/rc.d/rc.local, and it doen't seem to have really made any difference: the driver still gets loaded after the md detection stage, which means the array doesn't get picked up.

Any ideas?

McCloud 01-16-2005 07:04 AM

Quote:

Try placing the highpoint module in the ramdisk file.
This is the answer to your problem. I myself have a Promise FastTrak 100TX2 RAID controller. I need to put the driver-module in my 'initrd' (initial ramdisk), so my kernel can be loaded from my RAID array (the ramdisk gets loaded before the kernel gets loaded). So do a search on howto create an initial ramdisk with your distro and kernel.

The Belgain 01-16-2005 08:10 AM

Right... cheers, I'll have a look into that. Is it entirely necessary in my case though? I'm not trying to boot off the RAID array here... I just want it to be autodetected...

The Belgain 01-16-2005 08:55 AM

Right.... well I've gone for the hacky solution of just adding this right at the end of my /etc/rc.d/rc.S file:

Code:

modprobe hptr1540
mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdb2
mount /dev/md0 /mnt/md0

This seems to work as far as I can see. It's obviously not an ideal solution, but it'll do I think. Is there any particular reason why this would be a bad idea?


All times are GMT -5. The time now is 12:23 PM.