From owner-freebsd-emulation@FreeBSD.ORG Wed Aug 20 08:41:45 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8D2A106566B for ; Wed, 20 Aug 2008 08:41:45 +0000 (UTC) (envelope-from andr.pl@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.189]) by mx1.freebsd.org (Postfix) with ESMTP id 4B71A8FC08 for ; Wed, 20 Aug 2008 08:41:45 +0000 (UTC) (envelope-from andr.pl@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so350269fkk.11 for ; Wed, 20 Aug 2008 01:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=4mgfF3w/dZ3MfpSjq8JNmII1Ov+3ieUwmk3udBEqJzU=; b=Xu0t3tudifzhOVh89wXovYEC4XDrtFhp8PNaoSkUKIWwJIPNY1FaKVhSI5AfM3o19y zbGwRdEQhESPIkL+g5c3aiRuzzpqovG4+xVW6C4md20YRijX7bqjWAHF4CGvBCTIS3k1 dH9d2KeZQbg9oA3X2ojbAGFvVmttSNqwsojFA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=mcgF0o9oB/3DNbAM8bnuyEd6L2ug4upyxO3t8oJX8XWFE0d+UF4BQDK8hyKWZK47W1 m3Qr8Tf28VlsR9tjLBPjl0mZum1dC+TUx4MdW1ip5ulJJlsASDrFWg/m3PO80hC4DcHY pe16dWk8M5qGm7feZSooXV/tzkjoY542Cq6bQ= Received: by 10.181.27.7 with SMTP id e7mr4326619bkj.2.1219220089731; Wed, 20 Aug 2008 01:14:49 -0700 (PDT) Received: from localhost ( [87.250.250.189]) by mx.google.com with ESMTPS id c28sm1186014fka.18.2008.08.20.01.14.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Aug 2008 01:14:48 -0700 (PDT) Date: Wed, 20 Aug 2008 12:14:45 +0400 From: Andrey Ignatov To: freebsd-emulation@freebsd.org Message-ID: <20080820081414.GA68778@rdna.yandex.ru> Mail-Followup-To: freebsd-emulation@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: mutt-ng/devel-r804 (FreeBSD) Subject: linux-megacli and linsysfs X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 08:41:45 -0000 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 at scbus0 target 17 lun 0 (ses0,pass0) at scbus0 target 18 lun 0 (ses1,pass1) at scbus0 target 19 lun 0 (pass2) at scbus0 target 20 lun 0 (pass3) at scbus0 target 21 lun 0 (pass4) at scbus0 target 22 lun 0 (pass5) at scbus0 target 23 lun 0 (pass6) at scbus0 target 24 lun 0 (pass7) at scbus0 target 25 lun 0 (pass8) at scbus0 target 26 lun 0 (pass9) at scbus0 target 27 lun 0 (pass10) at scbus0 target 28 lun 0 (pass11) at scbus0 target 29 lun 0 (pass12) at scbus0 target 30 lun 0 (pass13) at scbus0 target 31 lun 0 (pass14) at scbus0 target 32 lun 0 (pass15) at scbus0 target 33 lun 0 (pass16) at scbus1 target 0 lun 0 (da0,pass17) 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: port 0x3000-0x30ff mem 0xd8240000-0xd827ffff,0xd8200000-0xd823ffff irq 16 at device 0.0 on pci6 ... mpt0: 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 at scbus0 target 0 lun 0 (pass0,da0) at scbus0 target 1 lun 0 (pass1,da1) at scbus0 target 8 lun 0 (ses0,pass2) at scbus2 target 34 lun 0 (ses1,pass3) at scbus2 target 50 lun 0 (pass4) at scbus2 target 51 lun 0 (pass5) at scbus2 target 52 lun 0 (pass6) at scbus2 target 53 lun 0 (pass7) at scbus2 target 54 lun 0 (pass8) at scbus2 target 55 lun 0 (pass9) at scbus2 target 56 lun 0 (pass10) at scbus2 target 57 lun 0 (pass11) at scbus2 target 58 lun 0 (pass12) at scbus2 target 59 lun 0 (pass13) at scbus2 target 60 lun 0 (pass14) at scbus2 target 61 lun 0 (pass15) at scbus2 target 62 lun 0 (pass16) at scbus2 target 63 lun 0 (pass17) 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: port 0xec00-0xecff mem 0xfc7fc000-0xfc7fffff,0xfc7e0000-0xfc7effff irq 16 at device 0.0 on pci1 ... mfi0: 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