RHEL 6.2 scsi host adapter ordering.

Latest response

Hi Folks,

 

I'm noticing in RHEL 6.2 that the ordering of my SCSI host adapters has changed.  Previous to RHEL 6.2, my local SAS bus was enumerated first, causing my local disk to be /dev/sda ... and all LUNs on my fiber HBAs to come after that.  However, since upgrading to RHEL 6.2, my local disk seems to come last after all of my SAN-based LUNs.

 

I've done a bit of searching, but don't see how best in RHEL 6 to force the "scsi_hostadapter" ordering.  Can someone clue me in on this under RHEL 6, please?

 

Thanks.

Responses

Hi Andy,

 

You'll want to check out /etc/modules.conf

 

While I don't know the exact setup/module names you've got, but in the example below, the SAN device is being loaded first:

alias scsi_hostadapter qla2200
alias scsi_hostadapter1 ips

It is possible to modify this to look as below:

alias scsi_hostadapter ips
alias scsi_hostadapter99 qla2200

You'll notice that ips, the local storage, is first and qla2200 has had the number 99 appended to its alias.
This will cause the module to load last in the initramfs. You'll have to rebuild this after the
change has been made.

# cp /boot/initramfs-$(uname -r).img /boot/initramfs-($uname -r).img.bak
# dracut -f 

Let me know how you go and whether I'm on the right track here. :)

Cheers,
Rohan

Hi Rohan,

 

I don't think that doing this in /etc/modules.conf is valid for RHEL 6.  It certainly didn't work for me.  This is what I would've done with RHEL 5 and below... but I'm trying to find the new method in RHEL 6 and I don't seem to be hitting upon it.

 

My system has the local storage using the "megaraid_sas" driver as well as network storage using the "qla2xxx" driver.

 

Any thoughts?

 

-Andy

Worst case, you can always use custom UDEV rules to force the system to give specific names to specific disk IDs.

Hi Andy,

 

You're absolutely right. I had a look around for you and stumbled across the following knowledgebase article:

 

https://access.redhat.com/kb/docs/DOC-45750

 

In there you'll see you can add a custom config into  /etc/modprobe.d/ with a line similar to the following:

install second_module { /sbin/modprobe first_module; } ; /sbin/modprobe --first-time --ignore-install second_module

What you could do with this is have your local storage controller module load first, and then the SAN load second.

An alternative way would be to add it to the kernel line in your grub config:

 

rdloaddriver=first_module rdloaddriver=second_module rdloaddriver=third_module


Apologies for the misinformation! Hopefully this will get you on the right track.

Cheers,
Rohan

Rohan,

 

Thanks for the information... I'm a little ashamed that I didn't stumble across that one myself.  That absolutely solved my issue.

 

As an aside, is it me or is that solution a little... klunky?  This seems like a common problem with scsi host adapter ordering.  I would have expected something a bit less arcane as the new & sexy way of doing this.

 

In any case, though... thanks again for the assist.

 

Andy

Hi Andy,

 

Thanks for the feedback. I am glad that this worked for you. I also had trouble finding solid information on the matter. To make it easier to find in the future I have submitted a new knowledgebase article for review. Once it is published I will post here with the link so you can access it for future reference.

 

I agree that this wasn't as easy to do as it could be, but hopefully having some more accessible documentation on it now will simplify the matter in the future.

 

I appreciate you opening up the discussion on here. The results will make it easier for many other to achieve the same goal with ease now.

 

Cheers, :)

Rohan

What is the exact syntax that you used ?

Best regards.

 

We have run into this as well and it is kind of a pain because you need to code the logic correctly to load the specific scsi module for the internal disk, the newer hp boxes use the hpsa, the newer dell use the megaraid_sas.  For our config, using the hp dl980g7 as an example, we populate this under /etc/modprobe.d in a file called dl980g7.conf with (this should be on one line):

install qla2xxx { /sbin/modprobe hpsa; } ; /sbin/modprobe --first-time --ignore-install qla2xxx

 

Then inside the /boot/grub/menu.lst file, add the following to the end of the kernel line:

rdloaddriver=hpsa rdloaddriver=qla2xxx

 

This assumes the server is using the hpsa driver to load its internal disk and the server is running the qlogic fiber hba's.

 

After a reboot you can confirm it is working by either looking in dmesg and ensuring the ordering came up as expected, and/or confirming with lsscsi.

 

Kevin