[bug] Wrong data from smartctl if disk is 'readonly' / in use

Martijn <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
Ladies, gents,

I unfortunately was unable to post this to Trac with my 
Sourceforge-account as suggested on smartmontools.org, so that is why 
I'm posting it here:

I've found that smartmontools 6.3 outputs wrong data about a disk, if 
the disk is in use by another process. This includes wrong data about 
the serial number of the drive, which surprised me (after it scared me 
;-)). I've tested this on a Windows host.

Attached are two files with the output of smartctl.exe --xall of the 
very same disk, once when it is in use by a VirtualBox virtual machine, 
and once without.

There are three important things to notice:
1. "Serial Number: 20202020202020203431"
I'm not sure what causes smartmontools to think this particular string 
is the serial number, but this is not the actual serial number ;-)
It scared me at first, because I thought this serial number was causes 
by some sort of problem with the firmware.

2. "Warning: Limited functionality due to missing admin rights" and 
"Function requires admin rights"

This is not accurate: I did have admin rights for that particular shell. 
Both attached files where created in the same shell, with the same 
rights. I would highly recommend a better description of possible 
causes, or seperate error messages for seperate cases.

3. "Device Statistics (GP Log 0x04) not supported" (for example)
Similar problem as #2.

Regarding #2 en #3: I can understand it's difficult to discover the 
difference between a disk that's in use, and not having enough 
permissions, or a disk that doesn't have certain features. I would 
recommend changing some of the messages to reflect that more could be 
going on than simply "no admin rights".

#1 seems like a fun bug that's worth debugging ;-)

Hope this helps improve smartmontools.

Regards,
- Martijn

------------------------------------------------------------------------------

_______________________________________________
Smartmontools-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartmontools-support
Crucial_CT1024M550SSD1_14100C07B9DF_good.txt (text/plain, 11.8 KB)
smartctl 6.3 2014-07-26 r3976 [x86_64-w64-mingw32-win7-sp1] (sf-6.3-1)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Crucial_CT1024M550SSD1
Serial Number:    14100C07B9DF
LU WWN Device Id: 5 00a075 10c07b9df
Firmware Version: MU01
User Capacity:    1.024.209.543.168 bytes [1,02 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Aug 13 21:00:44 2014 WEDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM level is:     254 (maximum performance)
Rd look-ahead is: Enabled
Write cache is:   Enabled
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80)	Offline data collection activity
					was never started.
					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: 		( 4765) 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: 	 (  12) minutes.
Conveyance self-test routine
recommended polling time: 	 (   3) minutes.
SCT capabilities: 	       (0x0035)	SCT Status 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          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   100   100   000    -    0
  5 Reallocated_Sector_Ct   PO--CK   100   100   000    -    0
  9 Power_On_Hours          -O--CK   100   100   000    -    96
 12 Power_Cycle_Count       -O--CK   100   100   000    -    2
171 Unknown_Attribute       -O--CK   100   100   000    -    0
172 Unknown_Attribute       -O--CK   100   100   000    -    0
173 Unknown_Attribute       -O--CK   100   100   000    -    0
174 Unknown_Attribute       -O--CK   100   100   000    -    1
180 Unused_Rsvd_Blk_Cnt_Tot PO--CK   000   000   000    -    8892
183 Runtime_Bad_Block       -O--CK   100   100   000    -    0
184 End-to-End_Error        -O--CK   100   100   000    -    0
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
194 Temperature_Celsius     -O---K   068   056   000    -    32 (Min/Max 24/44)
196 Reallocated_Event_Count -O--CK   100   100   000    -    16
197 Current_Pending_Sector  -O--CK   100   100   000    -    0
198 Offline_Uncorrectable   ----CK   100   100   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   100   100   000    -    0
202 Unknown_SSD_Attribute   P---CK   100   100   000    -    0
206 Unknown_SSD_Attribute   -OSR--   100   100   000    -    0
210 Unknown_Attribute       -O--CK   100   100   000    -    0
246 Unknown_Attribute       -O--CK   100   100   000    -    550141350
247 Unknown_Attribute       -O--CK   100   100   000    -    17192522
248 Unknown_Attribute       -O--CK   100   100   000    -    534235
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O     51  Comprehensive SMART error log
0x03       GPL     R/O  16383  Ext. Comprehensive SMART error log
0x04       GPL,SL  R/O    255  Device Statistics log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters
0x13       GPL     R/O      1  SATA NCQ Send and Receive log
0x24       GPL     R/O    429  Current Device Internal Status Data log
0x25       GPL     R/O    145  Saved Device Internal Status Data log
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa0       GPL     VS    2000  Device vendor specific log
0xa0       SL      VS     208  Device vendor specific log
0xa1-0xbf  GPL,SL  VS       1  Device vendor specific log
0xc0       GPL,SL  VS      80  Device vendor specific log
0xc1-0xdf  GPL,SL  VS       1  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log size 16383 not supported

SMART Error Log Version: 1
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        90         -
# 2  Vendor (0xff)       Completed without error       00%        90         -
# 3  Short offline       Completed without error       00%        17         -
# 4  Offline             Completed without error       00%         1         -
# 5  Short offline       Completed without error       00%         0         -

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.

SCT Status Version:                  3
SCT Version (vendor specific):       1 (0x0001)
SCT Support Level:                   0
Device State:                        Active (0)
Current Temperature:                    32 Celsius
Power Cycle Min/Max Temperature:     26/34 Celsius
Lifetime    Min/Max Temperature:     24/44 Celsius
Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        1 minute
Min/Max recommended Temperature:      0/70 Celsius
Min/Max Temperature Limit:           -5/75 Celsius
Temperature History Size (Index):    478 (47)

Index    Estimated Time   Temperature Celsius
  48    2014-08-13 13:03    30  ***********
 ...    ..( 74 skipped).    ..  ***********
 123    2014-08-13 14:18    30  ***********
 124    2014-08-13 14:19    31  ************
 125    2014-08-13 14:20    30  ***********
 126    2014-08-13 14:21    32  *************
 127    2014-08-13 14:22    33  **************
 128    2014-08-13 14:23    34  ***************
 129    2014-08-13 14:24    35  ****************
 130    2014-08-13 14:25    36  *****************
 131    2014-08-13 14:26    37  ******************
 132    2014-08-13 14:27    37  ******************
 133    2014-08-13 14:28    35  ****************
 134    2014-08-13 14:29    34  ***************
 135    2014-08-13 14:30    34  ***************
 136    2014-08-13 14:31    34  ***************
 137    2014-08-13 14:32    33  **************
 ...    ..(  2 skipped).    ..  **************
 140    2014-08-13 14:35    33  **************
 141    2014-08-13 14:36    32  *************
 ...    ..( 12 skipped).    ..  *************
 154    2014-08-13 14:49    32  *************
 155    2014-08-13 14:50    31  ************
 ...    ..( 67 skipped).    ..  ************
 223    2014-08-13 15:58    31  ************
 224    2014-08-13 15:59    30  ***********
 ...    ..(238 skipped).    ..  ***********
 463    2014-08-13 19:58    30  ***********
 464    2014-08-13 19:59     ?  -
 465    2014-08-13 20:00    26  *******
 466    2014-08-13 20:01    27  ********
 467    2014-08-13 20:02    30  ***********
 ...    ..(  2 skipped).    ..  ***********
 470    2014-08-13 20:05    30  ***********
 471    2014-08-13 20:06    32  *************
 472    2014-08-13 20:07    33  **************
 473    2014-08-13 20:08    34  ***************
 474    2014-08-13 20:09    34  ***************
 475    2014-08-13 20:10    33  **************
 476    2014-08-13 20:11    32  *************
 477    2014-08-13 20:12    32  *************
   0    2014-08-13 20:13    30  ***********
 ...    ..(  2 skipped).    ..  ***********
   3    2014-08-13 20:16    30  ***********
   4    2014-08-13 20:17    31  ************
 ...    ..( 31 skipped).    ..  ************
  36    2014-08-13 20:49    31  ************
  37    2014-08-13 20:50    30  ***********
 ...    ..(  9 skipped).    ..  ***********
  47    2014-08-13 21:00    30  ***********

SCT Error Recovery Control command not supported

Device Statistics (GP Log 0x04)
Page Offset Size         Value  Description
  1  =====  =                =  == General Statistics (rev 2) ==
  1  0x008  4                2  Lifetime Power-On Resets
  1  0x010  4               96  Power-on Hours
  1  0x018  6        550141350  Logical Sectors Written
  1  0x020  6          4577342  Number of Write Commands
  1  0x028  6          5669747  Logical Sectors Read
  1  0x030  6           607146  Number of Read Commands
  4  =====  =                =  == General Errors Statistics (rev 1) ==
  4  0x008  4                0  Number of Reported Uncorrectable Errors
  4  0x010  4                3  Resets Between Cmd Acceptance and Completion
  5  =====  =                =  == Temperature Statistics (rev 1) ==
  5  0x008  1               32  Current Temperature
  5  0x010  1               30  Average Short Term Temperature
  5  0x018  1                -  Average Long Term Temperature
  5  0x020  1               44  Highest Temperature
  5  0x028  1               24  Lowest Temperature
  5  0x030  1               34  Highest Average Short Term Temperature
  5  0x038  1               30  Lowest Average Short Term Temperature
  5  0x040  1                -  Highest Average Long Term Temperature
  5  0x048  1                -  Lowest Average Long Term Temperature
  5  0x050  4                -  Time in Over-Temperature
  5  0x058  1               70  Specified Maximum Operating Temperature
  5  0x060  4                -  Time in Under-Temperature
  5  0x068  1                0  Specified Minimum Operating Temperature
  6  =====  =                =  == Transport Statistics (rev 1) ==
  6  0x008  4                0  Number of Hardware Resets
  6  0x010  4                0  Number of ASR Events
  6  0x018  4                0  Number of Interface CRC Errors
  7  =====  =                =  == Solid State Device Statistics (rev 1) ==
  7  0x008  1                3~ Percentage Used Endurance Indicator
                              |_ ~ normalized value

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  4            0  Command failed due to ICRC error
0x000a  4            2  Device-to-host register FISes sent due to a COMRESET
Crucial_CT1024M550SSD1_20202020202020203431_bad.txt (text/plain, 4.7 KB)
smartctl 6.3 2014-07-26 r3976 [x86_64-w64-mingw32-win7-sp1] (sf-6.3-1)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

Warning: Limited functionality due to missing admin rights
=== START OF INFORMATION SECTION ===
Device Model:     Crucial_CT1024M550SSD1
Serial Number:    20202020202020203431
Firmware Version: MU01
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   [No Information Found]
Local Time is:    Wed Aug 13 21:01:42 2014 WEDT
SMART support is: Available - device has SMART capability.
                  Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Unavailable
Write cache is:   Unavailable
ATA Security is:  Unavailable
Wt Cache Reorder: Unavailable

Read SMART Thresholds failed: Function not implemented

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80)	Offline data collection activity
					was never started.
					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: 		( 4765) 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.
					No General Purpose Logging support.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  12) minutes.
Conveyance self-test routine
recommended polling time: 	 (   3) minutes.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   100   100   ---    -    0
  5 Reallocated_Sector_Ct   PO--CK   100   100   ---    -    0
  9 Power_On_Hours          -O--CK   100   100   ---    -    96
 12 Power_Cycle_Count       -O--CK   100   100   ---    -    2
171 Unknown_Attribute       -O--CK   100   100   ---    -    0
172 Unknown_Attribute       -O--CK   100   100   ---    -    0
173 Unknown_Attribute       -O--CK   100   100   ---    -    0
174 Unknown_Attribute       -O--CK   100   100   ---    -    1
180 Unused_Rsvd_Blk_Cnt_Tot PO--CK   000   000   ---    -    8892
183 Runtime_Bad_Block       -O--CK   100   100   ---    -    0
184 End-to-End_Error        -O--CK   100   100   ---    -    0
187 Reported_Uncorrect      -O--CK   100   100   ---    -    0
194 Temperature_Celsius     -O---K   068   056   ---    -    32 (Min/Max 24/44)
196 Reallocated_Event_Count -O--CK   100   100   ---    -    16
197 Current_Pending_Sector  -O--CK   100   100   ---    -    0
198 Offline_Uncorrectable   ----CK   100   100   ---    -    0
199 UDMA_CRC_Error_Count    -O--CK   100   100   ---    -    0
202 Data_Address_Mark_Errs  P---CK   100   100   ---    -    0
206 Flying_Height           -OSR--   100   100   ---    -    0
210 Unknown_Attribute       -O--CK   100   100   ---    -    0
246 Unknown_Attribute       -O--CK   100   100   ---    -    550141350
247 Unknown_Attribute       -O--CK   100   100   ---    -    17192522
248 Unknown_Attribute       -O--CK   100   100   ---    -    534555
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

Read SMART Log Directory failed: Function requires admin rights

ATA_READ_LOG_EXT (addr=0x00:0x00, page=0, n=1) failed: Function requires admin rights
Read GP Log Directory failed

SMART Extended Comprehensive Error Log (GP Log 0x03) not supported

Read SMART Error Log failed: Function requires admin rights

SMART Extended Self-test Log (GP Log 0x07) not supported

Read SMART Self-test Log failed: Function requires admin rights

Read SMART Selective Self-test Log failed: Function requires admin rights

SCT Commands not supported

Device Statistics (GP Log 0x04) not supported

SATA Phy Event Counters (GP Log 0x11) not supported
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.