From owner-freebsd-questions@FreeBSD.ORG Wed Jun 11 22:03:59 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DAE91065671 for ; Wed, 11 Jun 2008 22:03:59 +0000 (UTC) (envelope-from kalin@el.net) Received: from mail.el.net (mail.el.net [64.81.218.253]) by mx1.freebsd.org (Postfix) with ESMTP id B58A18FC1F for ; Wed, 11 Jun 2008 22:03:58 +0000 (UTC) (envelope-from kalin@el.net) Received: (qmail 38023 invoked by uid 1008); 11 Jun 2008 23:05:56 -0000 Received: from unknown (HELO kalins-macbook-pro.local) (kalin@el.net@68.173.244.62) by mail.el.net with ESMTPA; 11 Jun 2008 23:05:56 -0000 Message-ID: <48504BCD.9000106@el.net> Date: Wed, 11 Jun 2008 18:03:57 -0400 From: kalin m User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4844293F.7020507@el.net> <484438B1.5020202@unsane.co.uk> <484441D8.8050207@el.net> <48445F45.70604@unsane.co.uk> <48448134.9080808@el.net> <20080609085828.GA27082@dt1.in-muc.ciao.com> In-Reply-To: <20080609085828.GA27082@dt1.in-muc.ciao.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: mfi freebsd7 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2008 22:03:59 -0000 in case somebody gets stuck as i was - here are detailed instruction and the CORRECT ORDER in which the needed kernel modules HAVE to be loaded in order for the megacli to work properly... big thanks to Christoph Schug.... Christoph Schug wrote: > On Mon, Jun 02, 2008, kalin m wrote: > > >> thanks Vince... i didnt wanted to install the linux base because a lot of >> kids will be running some 'cool' boards or blogs that probably have cool >> linux holes too. but just for the hell of it and for he purpose to get to >> the controller i did. it took a while to find the >> Linux_MegaCli_1.01.09.zip. it's not on the freebsd site and not on the LSI >> site (anymore) either.. anyway after a lot of rpm downloads and patching >> and variable changing and fs mountings i get this: >> >> # /usr/local/sbin/megacli -adpCount >> ERROR:Could not detect controller. >> >> Controller Count: 0. >> > > From my experience there are some pitfalls when using the > sysutils/linux-megacli port. First of all you need the mfi_linux.ko > kernel module loaded. Moreover, this module has to be loaded _before_ > the Linux ABI stuff (linux.ko, linprocfs.ko, linsysfs.ko). So starting > with a pretty sane list of loaded kernel modules ... > > | # kldstat > | Id Refs Address Size Name > | 1 3 0xffffffff80100000 6eeea8 kernel > | 2 1 0xffffffff807ef000 14d0 accf_http.ko > | 3 1 0xffffffffb449f000 1fce nullfs.ko > | # kldload mfi_linux.ko > | # kldload linprocfs.ko linsysfs.ko > | # kldstat > | Id Refs Address Size Name > | 1 15 0xffffffff80100000 6eeea8 kernel > | 2 1 0xffffffff807ef000 14d0 accf_http.ko > | 3 1 0xffffffffb449f000 1fce nullfs.ko > | 7 1 0xffffffffb44a1000 3af mfi_linux.ko > | 8 3 0xffffffffb44a2000 18a6a linux.ko > | 9 1 0xffffffffb44bb000 350c linprocfs.ko > | 10 1 0xffffffffb469a000 9d3 linsysfs.ko > | # mount -t linprocfs linproc /compat/linux/proc > | # mount -t linsysfs linsys /compat/linux/sys > | # cat /compat/linux/sys/class/scsi_host/host*/proc_name > | megaraid_sas > | megaraid_sas > > In case you haven't loaded mfi_linux.ko before the other Linux ABI > stuff, you will see '(null)' entries here instead of 'megaraid_sas'. > Furthermore, the compat.linux.osrelease sysctl should be set to 2.6.12. > > | # sysctl -w compat.linux.osrelease=2.6.12 > | compat.linux.osrelease: 2.4.2 -> 2.6.12 > > If everything is fine, you should be able to query your RAID controller: > > | # megacli -LDInfo -LALL -aALL | grep ^State: > | State: Optimal > | State: Optimal > > This has been tested on a Dell PowerEdge 2970 with both an PERC5/i and > PERC5/e controller running FreeBSD 7.0/amd64. > > | # pciconf -lv | grep ^mfi > | mfi0@pci0:8:14:0: class=0x010400 card=0x1f031028 chip=0x00151028 rev=0x00 hdr=0x00 > | mfi1@pci0:15:14:0: class=0x010400 card=0x1f011028 chip=0x00151028 rev=0x00 hdr=0x00 > > -cs > >