# Order in which sata cards are named

## martin.john

Hi, I've recently added a HighPoint RocketRaid 2220 to my computer, patched my kernel and rebuilt it. Now I'm having a problem with the order in which linux names the devices. Basically it does the following

scsi0 : hptmv6 - the highpoint rocketraid 2220

scsi1 : ata_piix - onboard sata

scsi2 : ata_piix - onboard sata

scsi3 : sata_sil - a 2 port sata card

scsi4 : sata_sil - a port sata card

Two things strike me here.

1) Why does it only give 1 scsi id to the 8 port card, when it gives 1 per port for the other 2?

2) How can I get it to name the rocketraid card last?

What I've got is my main boot device attached to the motherboard on ata_piix, so when I attach a drive the rocketraid card it moves all the drive letters around. Now this isn't much of a problem with my settings in fstab as I can use udev rules to name them uniquely based on drive name, so I always point to the right drive but I can't seem to use those rules in my grub.conf and have to rely on /dev/sda3, etc. Which then fails when it's pointing to the drive.

This is made doubly annoying by the fact that the number of drives attached to the rocketraid card is liable to change, whereas the other drive assignments aren't.

Some (hopefully) useful output

 *Quote:*   

> lspci
> 
> 00:00.0 Host bridge: Intel Corporation E7520 Memory Controller Hub (rev 09)
> 
> 00:00.1 Class ff00: Intel Corporation E7525/E7520 Error Reporting Registers (rev 09)
> ...

 

 *Quote:*   

> dmesg output
> 
> ...snip...
> 
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> ...

 

Any help or pointers greatly appreciated.

I meant to add that the /dev/sda3 in my grub.conf (see below) is for passing through the my xen kernel (as if things weren't complicated enough)

 *Quote:*   

> 
> 
> default 0
> 
> timeout 5
> ...

 

----------

## sternklang

Hi,

Without knowing anything about this specific card, it seems to me you need to look at the state of the hardware before boot. Is it possible that your motherboard's BIOS controls the order in which drives/controllers appear to the system? Maybe some PCI-E vs PCI priority setting? 

Also, the card itself should allow you to access its BIOS on startup, so that may be where you need to go to deal with the number of ports recognized on boot.

----------

## martin.john

Cheers for that quick response. The only thing I noticed in the BIOS was the boot order, which was set to Motherboard, my 2 port PCI card, then the 8 port card, but I'll have another look about in it. And I've not looked about much in the BIOS for the 8 port card, so I'll give that a check out too.

cheers

----------

## troymc

 *martin.john wrote:*   

> 
> 
> 1) Why does it only give 1 scsi id to the 8 port card, when it gives 1 per port for the other 2?
> 
> 

 

You might want to check to see if you have the "probe all LUNs" option enabled in your kernel.

 *martin.john wrote:*   

> 
> 
> 2) How can I get it to name the rocketraid card last? 
> 
> 

 

You can modify the order the different drivers are loaded in the kernel source. I'd have to look to find exactly where. The order the interfaces are detected by the individual drivers [scsi3 : sata_sil -- scsi4 : sata_sil] would be controlled in the driver source.

EDIT: change the load order by changing the order they appear in /usr/src/linux/drivers/scsi/Makefile. [This is the link order.] The drivers listed first get loaded first. Make sure you read the comments & keep the HBA drivers in the HBA section.  My kernel doesn't seem to have that highpoint driver.  Was that something you manually installed?

troymc

----------

## martin.john

That's excellent advice. I'll give both those ideas a go.

Yes, I patched the highpoint driver into the kernel and it had put it top of the list

----------

## martin.john

That worked nicely for the boot order.

I think the fact that the drive doesn't come up might be more to do with the fact that it's empty and has no partitions set up. I think the raid card might be keeping it for a spare disk. I'll try and fdisk it on a seperate controller and see if that helps.

Thanks for the great advice.

regards,

Martin

----------

## martin.john

The two drives I had attached didn't show up in Linux because neither had any partition information on them. One was completely empty, the other was a lvm physical volume (but with no partitioning). So the controller had reserved them for it's own use (spares for a raid array, I guess). Once I'd partitioned them, they appeared.

Thanks very much for your help.

regards,

Martin

----------

## alexcorn

Dunno if you solved this, but I read in the original post that your system doesn't see each drive attached to the RAID controller. I have a rocketraid 1820a, and my setup doesn't see each individual drive. I think it will only recognize arrays that you set up yourself. I.E., the actual hard drives are transparent to linux, all linux sees are the arrays you set up in the raid manager.

By the way, have you been able to get hptsrv and hptraid (the GUI raid manager) to work? I had it working fine in SuSE, but since I moved to Gentoo I get a "System unreachable" error whenever I try to log in.

----------

## martin.john

Yes, thanks, all sorted now. I've not tried any of the linux raid managers yet, but I shall give them a go and see how I get on.

regards,

Martin

----------

## martin.john

Well, I think I've got the web based gui working. Only "think" though, as I'm not sure what I'm supposed to put for username and password. I'll continue to have a poke around

----------

