PCI device ordering

Derek Atkins warlord-DPNOqEs/LNQ at public.gmane.org
Mon Nov 29 16:23:49 EST 2010


Dan Ritter <dsr-mzpnVDyJpH4k7aNtvndDlA at public.gmane.org> writes:

> On Mon, Nov 29, 2010 at 03:32:24PM -0500, Stephen Adler wrote:
>> Hi blu,
>> 
>> I'm trying to upgrade a server from rhel5 to rhel6 to find that the 
>> order by which the kernel "discovers" the attached devices changes. 
>> Specifically, the mother board has 6 sata ports and I added 4 more using 
>> a PCI-e card. Under the 2.6.18 kernel of rhel5, the on board 6 channel 
>> sata controller is listed first and the PCI-e 4 port sata controller 
>> comes second. When I boot up under 2.6.32 kernel of rhel6, the PCI-e 
>> controller is seen first and then the on board 6 port controller is 
>> "seen" second. What this does is jumble up the driver order so that 
>> /dev/sda under the 2.6.8 kernel is now /dev/sdd under the 2.6.32 kernel. 
>> Is there anyway to force the kernel to scan the onboard sata controller 
>> first and then the PCI-e controller second?
>
> Don't do that.
>
> Mount by label or by UUID instead.
>
> That way, it doesn't matter what order they're detected in, and
> you can even swap around cables. (Boot drive detection
> permitting, of course.)

Hmm, but how would this affect MD raid devices?  For example,
/proc/mdstat reports raid devices based on sdX.  Although I guess
/etc/mdadm.conf does set up devices based on UUID.  So perhaps it's safe
from device re-ordering as well?

I'm considering adding another SATA card to my machine in order to
increase the number of drives from 4+DVD to 6+DVD.

> -dsr-

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord-DPNOqEs/LNQ at public.gmane.org                        PGP key available





More information about the Discuss mailing list