Opened 11 years ago

Closed 11 years ago

#278 closed defect (wontfix)

Adaptec 7 series and SATA disks problem

Reported by: szj Owned by: somebody
Priority: major Milestone:
Component: all Version: 6.1
Keywords: Cc:

Description

Hi,

There is a problem with monitoring SATA disks on Adaptec 7 series. I have identical Seagate SAS drives, Corsair Force GS SSD's and WDC SATA drives connected to Adaptec 6805 and Adaptec 71605 in another machine. All is fine on the machine with the 6805. On the machine with the 71605 the SAS drives work fine, but there is a problem with SATA drives. I tested various versions of smartmontools available in Debian and it's always the same. Smartd refuses to monitor the drives, claiming it can't enable SMART:

smartd[17562]: Device: /dev/sg7 [SAT], opened
smartd[17562]: Device: /dev/sg7 [SAT], WDC WD4000FYYZ-01UL1B0, S/N:WD-WCC130248974, WWN:5-0014ee-25d6165c4, FW:01.01K01, 4.00 TB
smartd[17562]: Device: /dev/sg7 [SAT], found in smartd database: Western Digital RE4 (SATA 6Gb/s)
smartd[17562]: Device: /dev/sg7 [SAT], could not enable SMART capability.

When treated with "smartctl -d sat -a /dev/sg7" it looks pretty normal though:

smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital RE4 (SATA 6Gb/s)
Device Model:     WDC WD4000FYYZ-01UL1B0
Serial Number:    WD-WCC130248974
LU WWN Device Id: 5 0014ee 25d6165c4
Firmware Version: 01.01K01
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Jun 13 19:05:14 2013 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (49020) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 530) minutes.
Conveyance self-test routine
recommended polling time:        (   5) minutes.
SCT capabilities:              (0x70bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   175   175   021    Pre-fail  Always       -       10225
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       9
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       663
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       9
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       8
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   114   109   000    Old_age   Always       -       38
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       437         -
# 2  Short offline       Completed without error       00%       429         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Please note the test results above - displayed as usal. You cannot however launch the tests with "smartctl -d sat -t long /dev/sg7" - smartctl complains about some badly formed scsi parameters:

smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Command "Execute SMART Extended self-test routine immediately in off-line mode" failed: scsi error badly formed scsi parameters

What't more interesting, you can launch the test pretending the disk is SCSI (!?) with "smartctl -d scsi -t long /dev/sg7":

smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

Extended Background Self Test has begun
Please wait 1092 minutes for test to complete.
Estimated completion time: Fri Jun 14 13:21:12 2013

Use smartctl -X to abort test

The test indeed takes place, and you can see the result later on with "smartctl -d sat -a /dev/sg7" (please note "-d sat", not "-d scsi" used to launch the test). Don't think you can check the test result with "smartctl -d scsi -a /dev/sg7" (still "-d scsi" is a must to launch the test) - the command will only display:

smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

User Capacity:        4,000,787,030,016 bytes [4.00 TB]
Logical block size:   512 bytes
Rotation Rate:        7200 rpm
Logical Unit id:      0x50014ee25d6165c4
Serial number:        WD-WCC130248974
Device type:          disk
Local Time is:        Thu Jun 13 19:13:35 2013 CEST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     39 C

Error Counter logging not supported

Device does not support Self Test logging

I even made a small patch to smartd so that it ignores "could not enable SMART capability" condition and it seems to monitor some attributes for those SATA drives. But unfortunately it will not support scheduling SMART tests for SATA drives.

It is also strange that to manually schedule SMART tests you need to pretend the SATA disks are SCSI and later on query them with smartctl back as regular SATA disks.

Change History (5)

comment:1 by Christian Franke, 11 years ago

Possibly a problem with NON-DATA ATA commands (SMART ENABLE, SMART EXECUTE OFF-LINE IMMEDIATE) issued through the controller's SAT layer.
Please try "smartctl -d sat -s on /dev/sg7".

comment:2 by szj, 11 years ago

root@adaptechost:~# smartctl -d sat -s on /dev/sg7

smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enable failed: scsi error badly formed scsi parameters

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

comment:3 by Christian Franke, 11 years ago

This result actually suggests a bug in the SAT ATA PASS-THROUGH(16) implementation of this controller's firmware and/or driver. You might want to send bug report to Adaptec.

Please try whether ATA PASS-THROUGH(12) command works: Use "-d sat,12" option.

What't more interesting, you can launch the test pretending the disk is SCSI (!?) with "smartctl -d scsi -t long /dev/sg7":

This is as expected. The SAT standard defines a translation from SCSI to ATA self-test commands. For example SEND DIAGNOSTIC(Background long self-test) is translated to SMART EXECUTE OFF-LINE IMMEDIATE(Extended self-test). This part of the SAT layer is apparently implemented properly.

comment:4 by szj, 11 years ago

It fails both with sat,12 and sat,16.

root@adaptechost:~# smartctl -d sat,12 -t short /dev/sg7
smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Command "Execute SMART Short self-test routine immediately in off-line mode" failed: scsi error badly formed scsi parameters

root@adaptechost:~# smartctl -d sat,16 -t short /dev/sg7
smartctl 6.2 2013-04-20 r3812 [x86_64-linux-3.2.46-1-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Command "Execute SMART Short self-test routine immediately in off-line mode" failed: scsi error badly formed scsi parameters

It must be more likely something with the controller then, as I use the very same driver in a host with Adaptec 6805 where it works fine.

comment:5 by Alex Samorukov, 11 years ago

Resolution: wontfix
Status: newclosed

buggy SAT implementation on specific controller - it is recommended to upgrade fw and contact vendor if problem persist

Note: See TracTickets for help on using tickets.