Date: Wed, 20 Aug 2008 12:14:45 +0400 From: Andrey Ignatov <andr.pl@gmail.com> To: freebsd-emulation@freebsd.org Subject: linux-megacli and linsysfs Message-ID: <20080820081414.GA68778@rdna.yandex.ru>
next in thread | raw e-mail | index | archive | help
Hi; I have many servers with RAID controllers Dell PERC 5/E, PERC 6/E (mfi driver in FreeBSD, man mfi). I use /usr/ports/sysutils/linux-megacli for software management of these controllers. This management utility works through linsysfs and linprocfs. I has tried run linux-megacli on several servers and found law. The utility works in case mfi0 is on scbus0 and is detected as host0 in linsysfs but not works in other case (is detected as host1, host2 etc. in linsysfs). For example, megacli works perfectly on server "one": one# camcontrol devlist <DELL MD1000 A.04> at scbus0 target 17 lun 0 (ses0,pass0) <DELL MD1000 A.04> at scbus0 target 18 lun 0 (ses1,pass1) <SEAGATE ST3146855SS S527> at scbus0 target 19 lun 0 (pass2) <SEAGATE ST3146855SS S527> at scbus0 target 20 lun 0 (pass3) <SEAGATE ST3146855SS S527> at scbus0 target 21 lun 0 (pass4) <SEAGATE ST3146855SS S527> at scbus0 target 22 lun 0 (pass5) <SEAGATE ST3146855SS S527> at scbus0 target 23 lun 0 (pass6) <SEAGATE ST3146855SS S527> at scbus0 target 24 lun 0 (pass7) <SEAGATE ST3146855SS S527> at scbus0 target 25 lun 0 (pass8) <SEAGATE ST3146855SS S527> at scbus0 target 26 lun 0 (pass9) <SEAGATE ST3146855SS S527> at scbus0 target 27 lun 0 (pass10) <SEAGATE ST3146855SS S527> at scbus0 target 28 lun 0 (pass11) <SEAGATE ST3146855SS S527> at scbus0 target 29 lun 0 (pass12) <SEAGATE ST3146855SS S527> at scbus0 target 30 lun 0 (pass13) <SEAGATE ST3146855SS S527> at scbus0 target 31 lun 0 (pass14) <SEAGATE ST3146855SS S527> at scbus0 target 32 lun 0 (pass15) <SEAGATE ST3146855SS S527> at scbus0 target 33 lun 0 (pass16) <FUJITSU MBA3147RC 0103> at scbus1 target 0 lun 0 (da0,pass17) <FUJITSU MBA3147RC 0103> at scbus1 target 1 lun 0 (da1,pass18) (Dell PowerVault MD1000 is pluged to mfi0 on scbus0) one# ls -d1 /compat/linux/sys/class/scsi_host/* /compat/linux/sys/class/scsi_host/host0 /compat/linux/sys/class/scsi_host/host1 one# head -n1 /compat/linux/sys/class/scsi_host/host?/proc_name ==> /compat/linux/sys/class/scsi_host/host0/proc_name <== megaraid_sas ==> /compat/linux/sys/class/scsi_host/host1/proc_name <== (null) one# megacli -AdpAllInfo -aALL | grep '^Product Name' Product Name : PERC 6/E Adapter RAID controller on this server is on scbus0 and is detected as host0 in linsysfs. This server based on motherboard Supermicro X7DBR-3, /var/run/dmesg.boot: ... mfi0: <Dell PERC 6> port 0x3000-0x30ff mem 0xd8240000-0xd827ffff,0xd8200000-0xd823ffff irq 16 at device 0.0 on pci6 ... mpt0: <LSILogic SAS/SATA Adapter> port 0x4000-0x40ff mem 0xd8510000-0xd8513fff,0xd8500000-0xd850ffff irq 16 at device 1.0 on pci9 mfi0 is detected out by the first, mpt0 - out by the second. But megacli not works on server "two": two# camcontrol devlist <SEAGATE ST973402SS S207> at scbus0 target 0 lun 0 (pass0,da0) <SEAGATE ST973402SS S207> at scbus0 target 1 lun 0 (pass1,da1) <DP BACKPLANE 1.05> at scbus0 target 8 lun 0 (ses0,pass2) <DELL MD1000 A.03> at scbus2 target 34 lun 0 (ses1,pass3) <ATA ST3500630NS 3BKH> at scbus2 target 50 lun 0 (pass4) <ATA ST3500630NS 3BKH> at scbus2 target 51 lun 0 (pass5) <ATA ST3500630NS 3BKH> at scbus2 target 52 lun 0 (pass6) <ATA ST3500630NS 3BKH> at scbus2 target 53 lun 0 (pass7) <ATA ST3500630NS 3BKH> at scbus2 target 54 lun 0 (pass8) <ATA ST3500630NS 3BKH> at scbus2 target 55 lun 0 (pass9) <ATA ST3500630NS 3BKH> at scbus2 target 56 lun 0 (pass10) <ATA ST3500630NS 3BKH> at scbus2 target 57 lun 0 (pass11) <ATA ST3500630NS 3BKH> at scbus2 target 58 lun 0 (pass12) <ATA ST3500630NS 3BKH> at scbus2 target 59 lun 0 (pass13) <ATA ST3500630NS 3BKH> at scbus2 target 60 lun 0 (pass14) <ATA ST3500641AS A> at scbus2 target 61 lun 0 (pass15) <ATA ST3500630NS 3BKH> at scbus2 target 62 lun 0 (pass16) <ATA ST3500630NS 3BKH> at scbus2 target 63 lun 0 (pass17) <ATA ST3500630NS 3BKH> at scbus2 target 64 lun 0 (pass18) two# ls -d1 /compat/linux/sys/class/scsi_host/* /compat/linux/sys/class/scsi_host/host0 /compat/linux/sys/class/scsi_host/host1 two# head -n1 /compat/linux/sys/class/scsi_host/host?/proc_name ==> /compat/linux/sys/class/scsi_host/host0/proc_name <== (null) ==> /compat/linux/sys/class/scsi_host/host1/proc_name <== megaraid_sas two# megacli -AdpAllInfo -aALL two# echo $? 1 RAID controller is on scbus2 and is detected as host1 in linsysfs. It's Dell 1950. /var/run/dmesg.boot: ... mpt0: <LSILogic SAS/SATA Adapter> port 0xec00-0xecff mem 0xfc7fc000-0xfc7fffff,0xfc7e0000-0xfc7effff irq 16 at device 0.0 on pci1 ... mfi0: <Dell PERC 5/i> mem 0xd80f0000-0xd80fffff,0xfc5c0000-0xfc5dffff irq 18 at device 14.0 on pci11 mpt0 is detected out by the first, mfi0 - out by the second. megacli not works in this case .. But megacli identify correctly number of controllers on both servers: one# megacli -AdpCount Controller Count: 1. two# megacli -AdpCount Controller Count: 1. hint.scbus.0.at="mfi0" in /boot/device.hints on server "two" affects only a camcontrol's output but not affects a order of "hosts" in linsysfs (megaraid_sas is detected as host1). The result does not depend on type of the controller (PERC 5/E or PERC 6/E). How I can change order of "hosts" in linsysfs that megaraid_sas was in host0 ? Other workaround ? I shall be grateful for any ideas. Thanks. -- Andrey Ignatov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080820081414.GA68778>