tying down adaX to physical interfaces

Michael DeMan freebsd at deman.com
Sat Mar 26 00:21:56 UTC 2011


Hi All,

I seem to recall that there is a way to do this, but can no longer google it.

Basically, for NCQ support with SATA devices we are using the 'ada' driver, which of course has SCSI like behavior.

With two 8-port disk controllers in the system, we end up in the uncomfortable situation where if the box is rebooted with an 'earlier' drive in the list, the system boots up with different drives mapped to adaX.  This becomes more of a problem with multiple drive controllers and not all the ports populated with drives at the start (i.e, add more drives later).

In our case, we have two Marvell controllers, and are doing ZFS mirroring with drives off each controller.

We end up with mvsch.0 through mvsch.15 showing up (16 controller interfaces), but with only 10 drives right now, we end up with ada0 through ada9.  If we lose a drive and reboot, then we end up with the upper ones each being ada(X-1), etc.  If we add more drives, the situation becomes even more confusing.

Is there a way to force at boot time a mapping from the mvsch interface to the specific ada disk that the operating system sees?  Pretty sure I saw something about this last summer but can't seem to find it now.

What we would like to have, with 10 disks, is them showing up as:
ada0, ada1, ada2, ada3, ada4
ada8, ada9, ada10, ada11, ada12

If we add another pair of disks in the future, we would know where to physically insert them for ada5 and ada13, etc.

Some appropriate sysctl info below.

Thanks,

- mike



# sysctl -a | grep kern.disks
kern.disks: ada9 ada8 ada7 ada6 ada5 ada4 ada3 ada2 ada1 ada0 da0


# sysctl -a | grep mvs
dev.mvs.0.%desc: Marvell 88SX6081 SATA controller
dev.mvs.0.%driver: mvs
dev.mvs.0.%location: slot=1 function=0
dev.mvs.0.%pnpinfo: vendor=0x11ab device=0x6081 subvendor=0x11ab subdevice=0x11ab class=0x010000
dev.mvs.0.%parent: pci1
dev.mvs.1.%desc: Marvell 88SX6081 SATA controller
dev.mvs.1.%driver: mvs
dev.mvs.1.%location: slot=3 function=0
dev.mvs.1.%pnpinfo: vendor=0x11ab device=0x6081 subvendor=0x11ab subdevice=0x11ab class=0x010000
dev.mvs.1.%parent: pci1
dev.mvsch.0.%desc: Marvell SATA channel
dev.mvsch.0.%driver: mvsch
dev.mvsch.0.%location: channel=0
dev.mvsch.0.%parent: mvs0
dev.mvsch.1.%desc: Marvell SATA channel
dev.mvsch.1.%driver: mvsch
dev.mvsch.1.%location: channel=1
dev.mvsch.1.%parent: mvs0
dev.mvsch.2.%desc: Marvell SATA channel
dev.mvsch.2.%driver: mvsch
dev.mvsch.2.%location: channel=2
dev.mvsch.2.%parent: mvs0
dev.mvsch.3.%desc: Marvell SATA channel
dev.mvsch.3.%driver: mvsch
dev.mvsch.3.%location: channel=3
dev.mvsch.3.%parent: mvs0
dev.mvsch.4.%desc: Marvell SATA channel
dev.mvsch.4.%driver: mvsch
dev.mvsch.4.%location: channel=4
dev.mvsch.4.%parent: mvs0
dev.mvsch.5.%desc: Marvell SATA channel
dev.mvsch.5.%driver: mvsch
dev.mvsch.5.%location: channel=5
dev.mvsch.5.%parent: mvs0
dev.mvsch.6.%desc: Marvell SATA channel
dev.mvsch.6.%driver: mvsch
dev.mvsch.6.%location: channel=6
dev.mvsch.6.%parent: mvs0
dev.mvsch.7.%desc: Marvell SATA channel
dev.mvsch.7.%driver: mvsch
dev.mvsch.7.%location: channel=7
dev.mvsch.7.%parent: mvs0
dev.mvsch.8.%desc: Marvell SATA channel
dev.mvsch.8.%driver: mvsch
dev.mvsch.8.%location: channel=0
dev.mvsch.8.%parent: mvs1
dev.mvsch.9.%desc: Marvell SATA channel
dev.mvsch.9.%driver: mvsch
dev.mvsch.9.%location: channel=1
dev.mvsch.9.%parent: mvs1
dev.mvsch.10.%desc: Marvell SATA channel
dev.mvsch.10.%driver: mvsch
dev.mvsch.10.%location: channel=2
dev.mvsch.10.%parent: mvs1
dev.mvsch.11.%desc: Marvell SATA channel
dev.mvsch.11.%driver: mvsch
dev.mvsch.11.%location: channel=3
dev.mvsch.11.%parent: mvs1
dev.mvsch.12.%desc: Marvell SATA channel
dev.mvsch.12.%driver: mvsch
dev.mvsch.12.%location: channel=4
dev.mvsch.12.%parent: mvs1
dev.mvsch.13.%desc: Marvell SATA channel
dev.mvsch.13.%driver: mvsch
dev.mvsch.13.%location: channel=5
dev.mvsch.13.%parent: mvs1
dev.mvsch.14.%desc: Marvell SATA channel
dev.mvsch.14.%driver: mvsch
dev.mvsch.14.%location: channel=6
dev.mvsch.14.%parent: mvs1
dev.mvsch.15.%desc: Marvell SATA channel
dev.mvsch.15.%driver: mvsch
dev.mvsch.15.%location: channel=7
dev.mvsch.15.%parent: mvs1









More information about the freebsd-fs mailing list