Martin said:
That should respond to standard SMART_SEND_DRIVE_COMMAND/SMART_RCV_DRIVE_DATA IOCTLs to "\\.\PhysicalDrive2" user-mode object on your machine.
but it seems not so with smartctl:
C:\>smartctl -r ioctl,2 -i -A /dev/sdg
smartctl 5.43 2012-06-30 r3573 [i686-w64-mingw32-xp-sp3] (sf-5.43-1)
Copyright (C) 2002-12 by Bruce Allen,
http://smartmontools.sourceforge.net
\\.\PhysicalDrive6: successfully opened
IOCTL_STORAGE_QUERY_PROPERTY returns:
Vendor: "ST320005"
Product: "42AS "
Revision: "CC34"
Removable: No
BusType: 0x03
\\.\PhysicalDrive6: successfully opened
REPORT-IOCTL: Device=/dev/sdg Command=IDENTIFY DEVICE
Input: FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN
IOCTL_ATA_PASS_THROUGH failed, Error=1
Input : CMD=0xec, FR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00
SMART_GET_VERSION suceeded, bytes returned: 24
Vers = 1.1, Caps = 0x7, DeviceMap = 0x01
SMART_RCV_DRIVE_DATA suceeded, bytes returned: 528 (buffer 512)
Input : CMD=0xec, FR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00
[Duration: 0.003s]
REPORT-IOCTL: Device=/dev/sdg Command=IDENTIFY DEVICE returned 0
===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 5a 0c ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 |Z..?7.......?...|
016-031: 00 00 00 00 20 20 20 20 20 20 20 20 20 20 20 20 |.... |
032-047: 58 35 31 57 45 57 45 34 00 00 00 00 04 00 43 43 |X51WEWE4......CC|
048-063: 34 33 20 20 20 20 54 53 32 33 30 30 35 30 32 34 |43 TS23005024|
064-079: 53 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |SA |
080-095: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 | ..|
096-111: 00 00 00 2f 00 40 00 02 00 02 07 00 ff 3f 10 00 |.../.@.......?..|
112-127: 3f 00 10 fc fb 00 10 00 ff ff ff 0f 00 00 07 00 |?...............|
128-143: 03 00 78 00 78 00 78 00 78 00 00 00 00 00 00 00 |..x.x.x.x.......|
144-159: 00 00 00 00 00 00 1f 00 06 05 00 00 48 00 40 00 |............H.@.|
160-175: f0 01 29 00 6b 34 69 7f 63 41 68 34 09 be 63 41 |..).k4i.cAh4..cA|
176-191: 7f 40 c2 00 c2 00 c0 c0 fe ff 00 00 fe fe 00 00 |.@..............|
192-207: 00 00 00 00 00 00 00 00 b0 88 e0 e8 00 00 00 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 50 00 c5 8f 2e ef 5e |.........P.....^|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1e 40 |...............@|
240-255: 1c 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |.@..............|
256-271: 21 00 b0 88 e0 e8 b0 88 e0 e8 20 20 02 00 40 01 |!......... ..@.|
272-287: 00 01 00 50 06 3c 0a 3c 00 00 3c 00 00 00 08 00 |...P.<.<..<.....|
288-303: 00 00 00 00 4f 00 80 02 00 00 00 00 08 00 00 00 |....O...........|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 80 |.............@..|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 3f 10 00 00 |............?...|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 0c 17 00 00 00 00 00 00 00 00 10 10 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 e0 |................|
===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda LP
Device Model: ST32000542AS
Serial Number: 5X*****E
LU WWN Device Id: 5 000c50 02e8f5eef
Firmware Version: CC34
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Tue Jul 31 15:49:02 2012
SMART support is: Available - device has SMART capability.
Disabled status cached by OS, trying SMART RETURN STATUS cmd.
REPORT-IOCTL: Device=/dev/sdg Command=SMART STATUS
Input: FR=0xda, SC=...., LL=...., LM=0x4f, LH=0xc2, DEV=...., CMD=0xb0
IOCTL_ATA_PASS_THROUGH failed, Error=1
Input : CMD=0xb0, FR=0xda, SC=0x00, SN=0x00, CL=0x4f, CH=0xc2, SEL=0x00
SMART_SEND_DRIVE_COMMAND failed, Error=1117
Input : CMD=0xb0, FR=0xda, SC=0x00, SN=0x00, CL=0x4f, CH=0xc2, SEL=0x00
[Duration: 0.001s]
REPORT-IOCTL: Device=/dev/sdg Command=SMART STATUS returned -1 errno=5 [Input/output error]
SMART support is: Disabled
SMART Disabled. Use option -s with argument 'on' to enable it.
--
Tried to force it to use SMART_* IOCTL but same error:
REPORT-IOCTL: Device=/dev/sdg:s Command=SMART STATUS
Input: FR=0xda, SC=...., LL=...., LM=0x4f, LH=0xc2, DEV=...., CMD=0xb0
SMART_SEND_DRIVE_COMMAND failed, Error=1117
Input : CMD=0xb0, FR=0xda, SC=0x00, SN=0x00, CL=0x4f, CH=0xc2, SEL=0x00
[Duration: 0.001s]
REPORT-IOCTL: Device=/dev/sdg:s Command=SMART STATUS returned -1 errno=5 [Input/output error]
SMART support is: Disabled