From nobody@FreeBSD.org  Wed Oct 10 15:35:40 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E60B9FE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Oct 2012 15:35:40 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id B40368FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Oct 2012 15:35:40 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9AFZeAA018489
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Oct 2012 15:35:40 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9AFZeW4018475;
	Wed, 10 Oct 2012 15:35:40 GMT
	(envelope-from nobody)
Message-Id: <201210101535.q9AFZeW4018475@red.freebsd.org>
Date: Wed, 10 Oct 2012 15:35:40 GMT
From: John Klug <john.klug@unisys.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ioctl CAMGETPASSTHRU fails with mfi driver
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172575
>Category:       kern
>Synopsis:       [mfi] ioctl CAMGETPASSTHRU fails with mfi driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-scsi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 10 22:58:20 UTC 2012
>Closed-Date:    Thu Dec 13 22:47:54 UTC 2012
>Last-Modified:  Thu Dec 13 22:47:54 UTC 2012
>Originator:     John Klug
>Release:        9.0 p3
>Organization:
UNISYS
>Environment:
FreeBSD usrv-cse14.rsvl.unisys.com 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Thu Oct  4 15:55:24 CDT 2012     root@usrv-tsegp2:/usr/obj/freebsd/usr/src/sys/FREEBSD-amd64  amd64
>Description:
This problem causes sysutils/smartmontools to fail with the mfi driver peripheral devices.

# camcontrol inquiry /dev/mfid0
camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed
cam_lookup_pass: No such file or directory
cam_lookup_pass: either the pass driver isn't in your kernel
cam_lookup_pass: or mfid0 doesn't exist


# kldstat
Id Refs Address            Size     Name
 1   19 0xffffffff80200000 1409420  kernel
 2    1 0xffffffff8f20a000 17cf0    isboot.ko
 6    2 0xffffffff8f419000 6e90     mfi.ko
 7    1 0xffffffff8f420000 c3f      mfip.ko
 8    1 0xffffffff8f421000 132317   zfs.ko
 9    1 0xffffffff8f554000 3001     opensolaris.ko

usrv-cse14:/var/log# dmesg | grep mfid0
mfid0: <MFI Logical Disk> on mfi0
mfid0: 285568MB (584843264 sectors) RAID volume '' is optimal
GEOM: mfid0: the secondary GPT header is not in the last LBA.

# dmesg | grep mfid0
mfid0: <MFI Logical Disk> on mfi0
mfid0: 285568MB (584843264 sectors) RAID volume '' is optimal
GEOM: mfid0: the secondary GPT header is not in the last LBA.

# camcontrol inquiry /dev/pass2
pass2: <TOSHIBA MBF2300RC DA06> Fixed Uninstalled SCSI-6 device
pass2: Serial Number EB03PB302RPS
pass2: 150.000MB/s transfers

# smartd -d --configfile=/var/etc/smartd.conf  --logfacility=local5
smartd 5.42 2011-10-20 r3458 [FreeBSD 9.0-RELEASE-p3 amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Opened configuration file /var/etc/smartd.conf
Configuration file /var/etc/smartd.conf parsed.
Device: /dev/mfid0, unable to autodetect device type
Device: /dev/mfid1, unable to autodetect device type
Device: /dev/mfid2, unable to autodetect device type
Device: /dev/mfid3, unable to autodetect device type
Device: /dev/mfid4, unable to autodetect device type
Device: /dev/mfid5, unable to autodetect device type
Device: /dev/mfid6, unable to autodetect device type
Device: /dev/mfid7, unable to autodetect device type
Unable to monitor any SMART enabled devices. Try debug (-d) option. Exiting...


This problem makes it difficult to relate zpool devices to the device serial number and SMART information.
>How-To-Repeat:
Execute camcontrol inquiry on an mfi peripheral device.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Oct 10 23:41:43 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172575 

From: Sergey Kandaurov <pluknet@gmail.com>
To: bug-followup@FreeBSD.org, john.klug@unisys.com
Cc:  
Subject: Re: kern/172575: [mfi] ioctl CAMGETPASSTHRU fails with mfi driver
Date: Thu, 11 Oct 2012 14:28:56 +0400

 Did it ever work? Seems no.
 
 6.2-RELEASE
 camcontrol: /dev/mfid0 is not a valid device identifier
 camcontrol: please read the camcontrol(8) man page
 
 7.3-RELEASE
 camcontrol: /dev/mfid0 is not a valid device identifier
 camcontrol: please read the camcontrol(8) man page
 
 8.3-RELEASE
 camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed
 cam_lookup_pass: No such file or directory
 cam_lookup_pass: either the pass driver isn't in your kernel
 cam_lookup_pass: or mfid0 doesn't exist
 
 8.2-RELEASE w/ aac(4)
 camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed
 cam_lookup_pass: No such file or directory
 cam_lookup_pass: either the pass driver isn't in your kernel
 cam_lookup_pass: or aacd0 doesn't exist
 
 
 -- 
 wbr,
 pluknet

From: Sergey Kandaurov <pluknet@gmail.com>
To: bug-followup@FreeBSD.org, john.klug@unisys.com
Cc:  
Subject: Re: kern/172575: [mfi] ioctl CAMGETPASSTHRU fails with mfi driver
Date: Thu, 11 Oct 2012 18:41:39 +0400

 Well, you probably want to kldload mfip to get SCSI passthough?
 
 # kldload mfip
 
 mfip0: <SCSI Passthrough Bus> on mfi0
 ses0 at mfi0 bus 0 scbus0 target 21 lun 0
 ses0: <IBM-ESXS SAS EXP BP 602A> Fixed Enclosure Services SCSI-4 device
 ses0: 150.000MB/s transfers
 ses0: SCSI-3 SES Device
 
 # camcontrol inquiry /dev/ses0
 pass12: <IBM-ESXS SAS EXP BP 602A> Fixed Enclosure Services SCSI-4 device
 pass12: 150.000MB/s transfers
 
 # camcontrol devlist /dev/ses0
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 9 lun 0 (pass0)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 10 lun 0 (pass1)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 11 lun 0 (pass2)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 12 lun 0 (pass3)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 13 lun 0 (pass4)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 14 lun 0 (pass5)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 15 lun 0 (pass6)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 16 lun 0 (pass7)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 17 lun 0 (pass8)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 18 lun 0 (pass9)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 19 lun 0 (pass10)
 <IBM-ESXS MBF2300RC SB28>          at scbus0 target 20 lun 0 (pass11)
 <IBM-ESXS SAS EXP BP 602A>         at scbus0 target 21 lun 0 (pass12,ses0)
 
 # camcontrol inquiry /dev/pass8
 pass8: <IBM-ESXS MBF2300RC SB28> Fixed Uninstalled SCSI-6 device
 pass8: Serial Number EB71XXXX
 pass8: 150.000MB/s transfers
 
 
 -- 
 wbr,
 pluknet

From: John Baldwin <jhb@freebsd.org>
To: freebsd-amd64@freebsd.org
Cc: John Klug <john.klug@unisys.com>,
 freebsd-gnats-submit@freebsd.org
Subject: Re: amd64/172575: ioctl CAMGETPASSTHRU fails with mfi driver
Date: Fri, 12 Oct 2012 11:09:39 -0400

 > This problem makes it difficult to relate zpool devices to the device serial 
 number and SMART information.
 
 mfidX are logical volumes, not physical drives.  passX are physical drives and 
 that is what smartd needs to monitor.  This is not a bug, this is just how you 
 have to use smartd with drives behind an mfi(4) controller.
 
 -- 
 John Baldwin
State-Changed-From-To: open->closed 
State-Changed-By: smh 
State-Changed-When: Thu Dec 13 22:47:53 UTC 2012 
State-Changed-Why:  
As per John's comment, this is not a bug. The passthrough devices should 
be used instead and they work as expected 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172575 
>Unformatted:
