SAS Drive Numbering inside the MPT driver

Damian McGuckin damianm at esi.com.au
Mon Apr 7 04:20:48 UTC 2008


We have been fighting with a SAS drive controller under the control of the 
MPT(4) driver. It is an LSI3041E-R, 4 drive controller, which is handled 
by the MPT driver. Nice controller. Drive work nice and fast. But, as a 
bootable controllers, its behaviour is almost unworkable.

Currently, when a virgin controller sees virgin disks, it allocates a scan 
order to the drives, and remembers their SAS addresses.

This memory feature is causing us grief. Also, allocation of the ordering 
of the controllers themselves does not seem to reflect PCI bus ordering.

Case 1:
======

Where there is only a single controller, from a virgin state, it assigns 
sequently drives in slots 0 through 3 to da0, da1, da2 and da3. It then
remembers the drive serial number, well strictly SAS address.

It will then boot off the LOWEST numbered drive.

If we then rip out the first of those drives, 'da0' from the machine, and 
insert an alternate boot disk in the same slot as the original 'da0', the 
controller decides it is now the FOURTH drive it has seen. So it will be 
return a scan ordering AFTER what was da3. So, it will return drive 
orderings which effectively renumber the drives. You now have

	slot 0 - 4th in the scan order :	da3
	slot 1 - 1st in the scan order :	da0
	slot 2 - 2nd in the scan order :	da1
	slot 3 - 3rd in the scan order :	da2

and it will attempt to boot off the drive in slot 1 because it is now the 
lowest numbered drive. There is NO way we can see to force the controller 
to boot off any drive other than the lowest numbered drive.

How do we fake booting off the drive in slot 0, or any nominated slot for
that matter?  Is there some hidden BIOS setting for these controllers?
Is there some SAS address drive mapping facility like SUN's ssd.conf?

Case 2:
======

We have 2 SAS controllers in one machine, call then 'first' and 'second'. 
The order in which it sees the controllers seems not to reflect the order
on the PCIe bus. While the BIOS will allow the user to nominate from which
controller to boot, it still returns drives found in the order it wants.

/dev/da0   Drive 1 on second controller with a Scan order of 0
/dev/da1   Drive 2 on second controller with a Scan order of 1
/dev/da2   Drive 1 on first controller with a Scan order of 0
/dev/da3   Drive 2 on first controller with a Scan order of 1
/dev/da4   Drive 3 on first controller with a Scan order of 2
/dev/da5   Drive 4 on first controller with a Scan order of 3

Again, how do we force the ordering, what the controller calls the scan
order?

Thanks - Damian

Pacific Engineering Systems International, 277-279 Broadway, Broadway NSW 2007
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here !
Views and opinions here are mine and not those of any past or present employer


More information about the freebsd-scsi mailing list