Opened 4 years ago

Closed 22 months ago

Last modified 22 months ago

#645 closed enhancement (wontfix)

Highpoint RocketRAID 2680SGL support (Windows)

Reported by: kenjiuno Owned by:
Priority: minor Milestone:
Component: all Version: 6.4
Keywords: highpoint windows Cc:

Description

Hi.

I have a RocketRAID 2680SGL and a SAS drive (SEAGATE ST3300657SS).

Is it able to access SMART info of this drive? Currently it is not available.

C:\Program Files\smartmontools\bin>smartctl.exe --scan
/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
/dev/sdc -d ata # /dev/sdc, ATA device
/dev/sde -d scsi # /dev/sde, SCSI device

C:\Program Files\smartmontools\bin>smartctl.exe -a /dev/sde
smartctl 6.4 2015-06-04 r4109 [x86_64-w64-mingw32-win8] (sf-6.4-1)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              ST3300657SS
Revision:             HPS0
User Capacity:        300,000,000,000 bytes [300 GB]
Logical block size:   512 bytes
Logical Unit id:      0x00193c0000000000
Serial number:
Device type:          disk
Local Time is:        Sat Jan 30 19:58:12 2016
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===

Error Counter logging not supported


[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging

I believe it is technically possible.

HighPoint? RAID Management Web GUI shows: Storage Health Inspector(SHI)

Device Name                    Device_1_5 
Model Number                   SEAGATE ST3300657SS-6SJ8R5090000N5250MUK 
Exception Control and Warning  Enabled  
 

SCSI S.M.A.R.T Attributes 

ID Name Value 
300 Read errors corrected by ECC hardware method           0 
301 Read errors corrected with possible delays             0 
302 Total read errors                                      0 
303 Total read errors corrected                        31009 
304 Total read errors corrected by algorythm               0 
305 Total bytes read                              3706967552 
306 Total uncorrected read errors                          0 
201 Write errors corrected with possible delays            0 
202 Total write errors                                     0 
203 Total write errors corrected                           0  
204 Total write errors corrected by algorythm              0 
205 Total bytes written                           1016861184 
206 Total uncorrected write errors                         0 
600 Non medium errors                                     69 
3700 Blocks sent to initiator                       24017387 
3701 Blocks received from initiator                 27125092 
3702 Blocks read from cache and sent to initiator     120457 
3703 I/O commands with size smaller than segment size  85601 
3704 I/O commands with size larger than segment size       0 
3e00 Power on time (minutes)                             620 
3e08 Remaining minutes until next internal test           35 

...

Is it SMART info?

And, I have succeeded to capture the API call DeviceIoControl? by api-monitor-v2r13-x86-x64.zip.

A sample capture:

#	Time of Day	Thread	Module	API	Return Value	Error	Duration
7	11:49:20.102 PM	26	HPTDEV.dll	DeviceIoControl ( 0x000000ec, IOCTL_SCSI_MINIPORT, 0x010b17d0, 324, 0x010b17d0, 324, 0x02d9e7f4, NULL )	TRUE		0.0583823

lpInBuffer: Pre call

0000  1c 00 00 00 48 50 54 2d 43 54 52 4c 14 00 00 00  ....HPT-CTRL....
0010  ec 24 70 03 00 00 00 00 28 01 00 00 1c 00 00 00  .$p.....(.......
0020  04 01 00 00 01 00 00 00 01 00 00 0a 4d 00 6f 00  ............M.o.
0030  00 00 00 00 fc 00 00 00 00 00 00 00 fc 00 00 00  ................
0040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0060  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0140  00 00 00 00                                      ....             

lpOutBuffer: Post call

0000  1c 00 00 00 48 50 54 2d 43 54 52 4c 14 00 00 00  ....HPT-CTRL....
0010  ec 24 70 03 00 00 00 00 28 01 00 00 1c 00 00 00  .$p.....(.......
0020  04 01 00 00 01 00 00 00 01 00 00 0a 4d 00 6f 00  ............M.o.
0030  00 00 00 00 fc 00 00 00 00 00 00 00 fc 00 00 00  ................
0040  00 00 00 00 fc 00 00 00 2f 00 00 58 00 00 03 08  ......../..X....
0050  00 00 32 44 34 00 00 00 00 03 03 04 00 00 00 e7  ..2D4...........
0060  00 04 03 04 00 00 00 06 00 05 03 0c 00 00 00 00  ................
0070  00 00 00 00 00 00 00 d3 00 06 03 28 04 00 00 00  ...........(....
0080  04 00 00 00 10 00 00 00 14 00 00 00 16 00 00 00  ................
0090  32 00 00 00 42 00 00 00 43 00 00 00 5b 00 00 00  2...B...C...[...
00a0  75 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  u...............
00b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0140  00 00 00 00                                      ....             

Is this useful?

I have saved captured data to a file HPTDEV.apmx86, and I can supply this.

kenjiuno

Attachments (3)

SHI0204.txt (47.6 KB) - added by kenjiuno 4 years ago.
Storage Health Inspector WebGUI output, API calls, all IN/OUT hexdumps
test-io.txt (10.3 KB) - added by kenjiuno 4 years ago.
API calls of Win_Linux_FreeBSD/smart/test.exe sample, some i/o buffers
os_win32.patch (19.7 KB) - added by kenjiuno 3 years ago.
Win32 Highpoint support.

Download all attachments as: .zip

Change History (16)

comment:1 in reply to:  description Changed 4 years ago by Christian Franke

Milestone: undecided
Priority: majorminor

Thanks for the info.

The "Post call" data is likely unrelated or incomplete. It does not contain any of the counter values printed.

Reverse engineering of a vendor specific I/O-control would require hours of testing with several disks. In general, relying solely on reverse engineering is dangerous as wrong parameters may brick devices.

As an user if this controller, you might want to ask the HighPoint support whether a vendor specific SCSI pass-through I/O-control exists and whether a spec is available.

comment:2 Changed 4 years ago by kenjiuno

Thanks for reply.

I agree that it is dangerous attempt to access devices with only reverse enginnered info.
I'll try to contact HighPoint? support for tech info... I'll inform if there is more process.

comment:3 Changed 4 years ago by kenjiuno

Hi.

HighPoint? support attached a develop info to me: hpt_driver_interface_v2.9.11_15_09_16.zip (1.24 MB).

It contains pdf programming guide, c header, static-lib and enough c samples for Win/Linux?/FreeBSD/OS X.

I'll ask HighPoint? support if we can share this kit within this community.

comment:4 Changed 4 years ago by kenjiuno

Hi.

HighPoint? support allowed us to share the kit. But no support. We'll have to solve the problems with this API kit ourselves...

comment:5 Changed 4 years ago by kenjiuno

here is API kit uploaded at my dropbox. (due to maximum 1MB limit of attachment system)
https://dl.dropboxusercontent.com/u/24560712/smartmontools/hpt_driver_interface_v2.9.11_15_09_16.zip

comment:6 Changed 4 years ago by Christian Franke

Thanks.

The API provides ATA and SCSI pass-through functions which work on FreeBSD, Linux and Windows. Unfortunately the native I/O-control calls of the driver are not documented and hidden in larger libraries. The source code of these libraries is not provided. The API kit does not provide any license information.

There are two ways to implement it for Windows:

  1. Use hpt_ide_pass_through*() and hpt_scsi_passthrough() from hptdev.dll. The DLL must be loaded dynamically such that smartmontools also works if the DLL is missing. Smartmontools project pages could not provide this DLL for download unless the vendor provides written permission and a sufficient license document.
  1. Trace sample calls to hptdev.dll to understand the native DeviceIoControl() calls passed to the driver. Use these calls in smartmontools.

Note that the FreeBSD and Linux versions of smartmontools already use native ioctl(...HPT_*...) calls to access Highpoint controllers.

comment:7 Changed 4 years ago by kenjiuno

Hi.

Thanks for detail inspection.

It will be interesting point how to implement API level interface to application.

Idea 1. would be better.

RocketRAID card owner should have hptdev.dll.
hptdev.dll is shipped with WebGUI which can be installed from driver CD or official Driver/Utility? Download section.
So we can prepare it by ourselves...

Idea 2. will be great one if much users volunteer tests! (I have a non-RAID SAS disk drive suitable for experimental test like this)

If there is enough spare time to support hptdev devices on Windows, I can test it. Please let me know!
If I have enough time, I'll write a support code for this project in some day...

Changed 4 years ago by kenjiuno

Attachment: SHI0204.txt added

Storage Health Inspector WebGUI output, API calls, all IN/OUT hexdumps

Changed 4 years ago by kenjiuno

Attachment: test-io.txt added

API calls of Win_Linux_FreeBSD/smart/test.exe sample, some i/o buffers

Changed 3 years ago by kenjiuno

Attachment: os_win32.patch added

Win32 Highpoint support.

comment:8 Changed 3 years ago by kenjiuno

Ok, I have done a patch for this support.

command line and some outputs:

smartctl.exe --scan

/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/hpt1 -d hpt-scsi # /dev/hpt1, SCSI device
/dev/hpt4 -d hpt-ata # /dev/hpt4, ATA device
Dll Init portName = (null), isNewCode=1

smartctl.exe -a /dev/hpt1

smartctl 6.4 2015-06-04 r4109 [i686-pc-mingw32-2012r2(64)] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              ST3300657SS
Revision:             HPS0
User Capacity:        300,000,000,000 bytes [300 GB]
Logical block size:   512 bytes
Rotation Rate:        15000 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000c5007f21675b
Serial number:        6SJ8R5090000N5250MUK
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Tue Apr 26 14:22:14 2016 
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Current Drive Temperature:     49 C
Drive Trip Temperature:        65 C

Elements in grown defect list: 0

Vendor (Seagate) cache information
  Blocks sent to initiator = 33172318
  Blocks received from initiator = 295324963
  Blocks read from cache and sent to initiator = 190266
  Number of read and write commands whose size <= segment size = 110694
  Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
  number of hours powered up = 399.67
  number of minutes until next internal SMART test = 60

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0     45636          0         16.984           0
write:         0        0         0         0          0        151.604           0

Non-medium error count:     2182

No self-tests have been logged

Dll Init portName = (null), isNewCode=1

smartctl.exe -a /dev/hpt4

smartctl 6.4 2015-06-04 r4109 [i686-pc-mingw32-2012r2(64)] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     JMicron based SSDs
Device Model:     TS256GSSD340
Serial Number:    20140312B3213602461F
LU WWN Device Id: 5 000000 000000000
Firmware Version: SVN263
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      < 1.8 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Apr 26 14:22:57 2016 
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

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
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: 		(   32) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No 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: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 (   1) minutes.
SCT capabilities: 	       (0x0039)	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     0x000a   100   100   000    Old_age   Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Unknown_JMF_Attribute   0x0007   100   100   050    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0
  7 Unknown_JMF_Attribute   0x000b   100   100   050    Pre-fail  Always       -       0
  8 Unknown_JMF_Attribute   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       10119
 10 Unknown_JMF_Attribute   0x0013   100   100   050    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       817
167 Unknown_JMF_Attribute   0x0022   100   100   000    Old_age   Always       -       0
168 SATA_Phy_Error_Count    0x0012   100   100   000    Old_age   Always       -       136
169 Unknown_JMF_Attribute   0x0013   100   100   010    Pre-fail  Always       -       2555904
170 Bad_Block_Count         0x0013   100   100   010    Pre-fail  Always       -       0 0 0
173 Erase_Count             0x0012   189   189   000    Old_age   Always       -       111 258 4
175 Bad_Cluster_Table_Count 0x0013   100   100   010    Pre-fail  Always       -       0
192 Unexpect_Power_Loss_Ct  0x0012   100   100   000    Old_age   Always       -       28
194 Temperature_Celsius     0x0022   063   063   030    Old_age   Always       -       37 (Min/Max 36/40)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
240 Unknown_JMF_Attribute   0x0013   100   100   050    Pre-fail  Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

Dll Init portName = (null), isNewCode=1

comment:9 Changed 3 years ago by Christian Franke

Milestone: undecidedRelease 6.6

Thanks for this patch.

Unfortunately it does no longer apply to current SVN head due to rearrangements done in r4254.

Are the struct declarations and other code copied from some HTP code or elsewhere? If yes, license and copyright needs to be mentioned and checked for compatibility with GPLv2+.

Further notes from a quick review:

  • Indentation and naming style is not consistent with rest of module.
  • malloc()/free() should be avoided in C++ (see raw_buffer class).
  • Unconditional __attribute__ declarations are used. This breaks compilation with MS compiler.
  • Non-trivial and virtual functions should not be coded inline.
  • Addresses of DLL functions should not be loaded on each call.
  • Multiple inheritance is used but not needed.
  • Output contains bogus Dll Init portName = (null)....
  • The 64-bit version of smartmontools should also be tested.

comment:10 Changed 3 years ago by Christian Franke

Component: smartctlall

comment:11 Changed 3 years ago by Christian Franke

Milestone: Release 6.6undecided

Patch does not longer apply and has various other issues including possible licensing problems. Set milestone back to undecided due to missing feedback from patch author.

comment:12 Changed 22 months ago by Christian Franke

Milestone: undecided
Resolution: wontfix
Status: newclosed

No feedback from patch author.

comment:13 Changed 22 months ago by Christian Franke

Please reopen this ticket if a working patch is available.

Note: See TracTickets for help on using tickets.