From owner-freebsd-scsi@FreeBSD.ORG Sat Mar 8 15:57:52 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16370106566B for ; Sat, 8 Mar 2008 15:57:52 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id A13008FC16 for ; Sat, 8 Mar 2008 15:57:51 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m28FvRKJ047054; Sat, 8 Mar 2008 08:57:27 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <47D2B767.5040403@samsco.org> Date: Sat, 08 Mar 2008 08:57:27 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: "Kenneth D. Merry" , d_elbracht References: <001301c88056$76745f60$639049d9@EC1a> <47D1605A.8030505@samsco.org> <003801c88069$57510cb0$639049d9@EC1a> <47D16578.4070104@samsco.org> <20080308010739.GA4855@nargothrond.kdm.org> In-Reply-To: <20080308010739.GA4855@nargothrond.kdm.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.4 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: AW: AW: only 8 LUNs on MPT X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 15:57:52 -0000 Kenneth D. Merry wrote: > On Fri, Mar 07, 2008 at 08:55:36 -0700, Scott Long wrote: >> d_elbracht wrote: >>> the tunable is set: >>> sysctl -a | grep kern.cam.cam_srch >>> kern.cam.cam_srch_hi: 1 >>> >>> here is the output from 'camcontrol inq da45': >>> >>> pass45: Fixed Direct Access SCSI-4 device >>> pass45: Serial Number 01F53A00000000472CF136000000 >>> 300.000MB/s transfers , Command Queueing Enabled >>> >>> Dieter >>> >> What version of FreeBSD is this? The max lun benhavior changed a >> bit in the SCSI layer a couple of years ago. The MPT driver itself >> supports up to 256 LUNs. > > I think the problem may be: > > cpi->max_lun = 7; > > That's from line 3590 in rev 1.63 of mpt_cam.c. (i.e. -current) > > I ran into the same problem a few days ago in RELENG_7, but hadn't gotten > around to sending email about it yet. > > The symptom I was having is all the LUNs on the target wouldn't probe > automatically. I could rescan them manually, but CAM would stop probing at > 7. > > I fixed it by setting max_lun to 1024. (Not sure if anything would break > if I actually got that high, but my target was only setup for 79 LUNs.) > > Ken Ok, I missed it on my first look since there's code elsewhere in the driver that specifically handles up to 16k LUNs as an initiator and 256 LUNs as a target. I guess the value in XPT_PATH_INQ is there so that CAM won't spend hours at boot-time scanning for all possible LUNs. I could change it to something like 256, but that will still significantly increase the boot time. What really needs to happen is to have REPORT_LUNS implemented for the probe. Until that happens, what I'd suggest doing is to just manually scan your high lun. I'll see if I can come up with a REPORT_LUNS patch, if anyone is willing to play guinea pig. For the sake of safety with older broken SCSI devices, I might limit it to working only with FC initiators, only only with devices that report SCSI-4 or higher. We'll have to play with that. Scott