From owner-freebsd-ports@FreeBSD.ORG  Sun Apr 27 22:08:11 2008
Return-Path: <owner-freebsd-ports@FreeBSD.ORG>
Delivered-To: freebsd-ports@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A60E9106567A
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 22:08:11 +0000 (UTC)
	(envelope-from gcr+freebsd-ports@tharned.org)
Received: from xm20.infosec.fedex.com (xm20.infosec.fedex.com [199.81.217.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 666258FC14
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 22:08:11 +0000 (UTC)
	(envelope-from gcr+freebsd-ports@tharned.org)
X-AuditID: c751825c-aa6c5bb00000068e-50-4814ee4ff123
Received: from inet03.prod.fedex.com (inet03.prod.fedex.com [199.81.10.43])
	by xm20.infosec.fedex.com (FedEx MX) with ESMTP id 6E6554E4002
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 16:21:19 -0500 (CDT)
Received: from nc8000.tharned.org ([172.18.96.131])
	by inet03.prod.fedex.com (8.12.11/8.12.11) with ESMTP id m3RLLIXq008693
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 16:21:19 -0500 (CDT)
Received: from nc8000.tharned.org (localhost [127.0.0.1])
	by nc8000.tharned.org (8.14.2/8.14.2) with ESMTP id m3RJ8I8g005838
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 14:08:18 -0500 (CDT)
	(envelope-from gcr+freebsd-ports@tharned.org)
Received: from localhost (gcr@localhost)
	by nc8000.tharned.org (8.14.2/8.14.2/Submit) with ESMTP id
	m3RJ8CrM005833
	for <freebsd-ports@freebsd.org>; Sun, 27 Apr 2008 14:08:17 -0500 (CDT)
	(envelope-from gcr+freebsd-ports@tharned.org)
Date: Sun, 27 Apr 2008 14:08:11 -0500 (CDT)
From: Greg Rivers <gcr+freebsd-ports@tharned.org>
To: freebsd-ports@freebsd.org
Message-ID: <alpine.BSF.1.10.0804271010060.1116@nc8000.tharned.org>
User-Agent: Alpine 1.10 (BSF 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Brightmail-Tracker: AAAAAA==
Subject: smartmontools-5.38 and cciss RAID controller
X-BeenThere: freebsd-ports@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
	<mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports>
List-Post: <mailto:freebsd-ports@freebsd.org>
List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
	<mailto:freebsd-ports-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Apr 2008 22:08:11 -0000

The recent incorporation of the FreeBSD CISS SMART support into the 
mainstream smartmontools distribution has had some unexpected results on 
several HP ProLiant DL380 G3 machines.  I have five DL380/G3s with four 
drives each; all have the same symptoms now: querying a given ciss/scsi 
target gives results for the wrong drive:

smartctl -iH -d cciss,0 /dev/ciss0  gives results for target 2
"               cciss,1 "           "                        3
"               cciss,2 "           does not see the drive there
"               cciss,3 "           gives results for target 0
"               cciss,4 "           "                        1

The actual drives are at targets 0, 1, 2 and 3.

I'm wondering if this is due to the CISS controller type being 
misidentified.  Before, querying a target with no drive present yielded
"Device: COMPAQ Smart Array 5i Version: 2.66", which is correct.
Now, querying a target with no drive yields a variable result,
eg. "Device: COMPAQ   PROLIANT 4LCI DT Version: 1.84"
or  "Device: COMPAQ   PROLIANT 6L2I    Version: 0.01"
which are all incorrect.  See below for more detailed information.

Has anyone else seen a similar problem?  Should I file a FreeBSD PR, or 
take this up with the smartmontools project?

-- 
Greg Rivers


The CISS controller as seen by `pciconf -lv`:
------------------------------------------------------------------------------
ciss0@pci0:1:3:0:	class=0x010400 card=0x40800e11 chip=0xb1780e11 rev=0x01 hdr=0x00
    vendor     = 'Compaq Computer Corp (Now owned by Hewlett-Packard)'
    device     = 'CISSB SMART2 Array Controller'
    class      = mass storage
    subclass   = RAID


Relevant `dmesg` output:
------------------------------------------------------------------------------
ciss0: <Compaq Smart Array 5i> port 0x3000-0x30ff mem 0xf7cc0000-0xf7cfffff,0xf7bf0000-0xf7bf3fff irq 30 at device 3.0 on pci1
ciss0: [ITHREAD]
da0 at ciss0 bus 0 target 0 lun 0
da0: <COMPAQ RAID 1  VOLUME OK> Fixed Direct Access SCSI-0 device 
da0: 135.168MB/s transfers
da0: 69459MB (142253280 512 byte sectors: 255H 32S/T 17433C)
da1 at ciss0 bus 0 target 1 lun 0
da1: <COMPAQ RAID 1  VOLUME OK> Fixed Direct Access SCSI-0 device 
da1: 135.168MB/s transfers
da1: 69459MB (142253280 512 byte sectors: 255H 32S/T 17433C)


The correct SMART status before the update to version 5.38:
------------------------------------------------------------------------------
# smartctl -iH -d cciss,0 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD0728856A       Version: HPB0
Serial number: AAL1P4800F7E0435
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:41:01 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,1 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD07289BB8       Version: HPB1
Serial number: DEL1P7100YH50703
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:41:07 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,2 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD07286224       Version: HPB6
Serial number: UUA1P4A0427W0444
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:41:11 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,3 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD0728856A       Version: HPB0
Serial number: AAL1P4800FML0435
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:41:16 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,4 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   Smart Array 5i Version: 2.66
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

# smartctl -iH -d cciss,5 /dev/ciss0
smartctl version 5.37 [i386-portbld-freebsd7.0] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   Smart Array 5i Version: 2.66
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
#


The erroneous SMART status after the update to version 5.38:
------------------------------------------------------------------------------
# smartctl -iH -d cciss,0 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD07286224       Version: HPB6
Serial number: UUA1P4A0427W0444
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:48:52 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,1 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD0728856A       Version: HPB0
Serial number: AAL1P4800FML0435
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:48:56 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,2 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   PROLIANT 4LCI DT Version: 1.84
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

# smartctl -iH -d cciss,3 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD0728856A       Version: HPB0
Serial number: AAL1P4800F7E0435
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:49:03 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,4 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   BD07289BB8       Version: HPB1
Serial number: DEL1P7100YH50703
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Apr 21 13:49:05 2008 CDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

# smartctl -iH -d cciss,5 /dev/ciss0
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: COMPAQ   PROLIANT 6L2I    Version: 0.01
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
#