Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong parsing 1TB capacity #23

Closed
MikePryadko opened this issue Jan 7, 2022 · 3 comments
Closed

Wrong parsing 1TB capacity #23

MikePryadko opened this issue Jan 7, 2022 · 3 comments
Assignees
Labels
bug Something isn't working fixed The issue has been fixed
Milestone

Comments

@MikePryadko
Copy link

System

OS: Xubuntu 20.04.3 LTS
kernel: Linux 5.11.0-43-generic #47~20.04.2-Ubuntu SMP Mon Dec 13 11:06:56 UTC 2021
smartctl: 7.1 2019-12-30 r5022 [x86_64-linux-5.11.0-43-generic] (local build)
gsmartcontrol: 1.1.3
hdd: Seagate/Samsung ST1000LM024 (HN-M101MBB)

Problem

smartctl (tab "General") says 1 TB, but gsmartcontrol (tab "General" -> button "View Output" -> window "Smartctl Output") shows 1 B

image

image

@ashaduri
Copy link
Owner

ashaduri commented Jan 8, 2022

Hello,
Thanks for reporting this.

I tried, but cannot reproduce the bug.

Can you please attach the smartctl output here? You can save it right from the "Smartctl Output" window.

Also, please attach the output of "locale" command.

Thanks!

@ashaduri ashaduri self-assigned this Jan 8, 2022
@ashaduri ashaduri added the bug Something isn't working label Jan 8, 2022
@MikePryadko
Copy link
Author

$ locale 
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL=
smartl output:
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.11.0-43-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Samsung SpinPoint M8 (AF)
Device Model:     ST1000LM024 HN-M101MBB
Serial Number:    S30YJ9JH601896
LU WWN Device Id: 5 0004cf 2122fa208
Firmware Version: 2BA30001
User Capacity:    1 000 204 886 016 bytes [1,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Sat Jan  8 12:02:33 2022 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Disabled
APM level is:     128 (minimum power consumption without standby)
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, NOT FROZEN [SEC1]

=== 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: 		(12300) 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: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 205) minutes.
SCT capabilities: 	       (0x003f)	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          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   100   100   051    -    0
  2 Throughput_Performance  -OS--K   252   252   000    -    0
  3 Spin_Up_Time            PO---K   092   092   025    -    2538
  4 Start_Stop_Count        -O--CK   100   100   000    -    561
  5 Reallocated_Sector_Ct   PO--CK   252   252   010    -    0
  7 Seek_Error_Rate         -OSR-K   252   252   051    -    0
  8 Seek_Time_Performance   --S--K   252   252   015    -    0
  9 Power_On_Hours          -O--CK   100   100   000    -    768
 10 Spin_Retry_Count        -O--CK   252   252   051    -    0
 11 Calibration_Retry_Count -O--CK   100   100   000    -    1
 12 Power_Cycle_Count       -O--CK   100   100   000    -    560
191 G-Sense_Error_Rate      -O---K   100   100   000    -    43
192 Power-Off_Retract_Count -O---K   100   100   000    -    156
194 Temperature_Celsius     -O----   064   056   000    -    21 (Min/Max 17/45)
195 Hardware_ECC_Recovered  -O-RCK   100   100   000    -    0
196 Reallocated_Event_Count -O--CK   252   252   000    -    0
197 Current_Pending_Sector  -O--CK   252   252   000    -    0
198 Offline_Uncorrectable   ----CK   252   252   000    -    0
199 UDMA_CRC_Error_Count    -OS-CK   200   200   000    -    0
200 Multi_Zone_Error_Rate   -O-R-K   100   100   000    -    549
223 Load_Retry_Count        -O--CK   100   100   000    -    1
225 Load_Cycle_Count        -O--CK   098   098   000    -    22416
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

ATA_READ_LOG_EXT (addr=0x00:0x00, page=0, n=1) failed: 48-bit ATA commands not implemented [JMicron]
Read GP Log Directory failed

SMART Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00           SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      2  Comprehensive SMART error log
0x06           SL  R/O      1  SMART self-test log
0x09           SL  R/W      1  Selective self-test log
0x80-0x9f      SL  R/W     16  Host vendor specific log
0xc0-0xdf      SL  VS      16  Device vendor specific log
0xe0           SL  R/W      1  SCT Command/Status
0xe1           SL  R/W      1  SCT Data Transfer

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

SMART Error Log Version: 1
No Errors Logged

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

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       767         -
# 2  Short offline       Completed without error       00%       685         -
# 3  Extended offline    Aborted by host               90%       685         -
# 4  Vendor (0x50)       Aborted by host               90%       401         -
# 5  Short offline       Aborted by host               90%       400         -
# 6  Vendor (0x50)       Aborted by host               90%       321         -
# 7  Short offline       Aborted by host               90%       320         -
# 8  Vendor (0x50)       Completed without error       00%       282         -
# 9  Short offline       Aborted by host               90%       282         -
#10  Vendor (0x50)       Aborted by host               90%       255         -
#11  Short offline       Aborted by host               90%       255         -
#12  Vendor (0x50)       Completed without error       00%       245         -
#13  Short offline       Completed without error       00%       245         -
#14  Vendor (0x50)       Completed without error       00%       205         -
#15  Short offline       Completed without error       00%       205         -
#16  Vendor (0x50)       Completed without error       00%       134         -
#17  Short offline       Aborted by host               90%       134         -
#18  Vendor (0x50)       Completed without error       00%       120         -
#19  Short offline       Aborted by host               90%       120         -
#20  Vendor (0x50)       Aborted by host               90%        98         -
#21  Short offline       Aborted by host               90%        98         -

SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Completed [00% left] (0-65535)
    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:                  2
SCT Version (vendor specific):       256 (0x0100)
Device State:                        Active (0)
Current Temperature:                    21 Celsius
Power Cycle Min/Max Temperature:     21/21 Celsius
Lifetime    Min/Max Temperature:     16/45 Celsius
Specified Max Operating Temperature:    80 Celsius
Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2
Temperature Sampling Period:         5 minutes
Temperature Logging Interval:        5 minutes
Min/Max recommended Temperature:     -5/80 Celsius
Min/Max Temperature Limit:           -10/85 Celsius
Temperature History Size (Index):    128 (102)

Index    Estimated Time   Temperature Celsius
 103    2022-01-08 01:25    21  **
 104    2022-01-08 01:30    27  ********
 105    2022-01-08 01:35    29  **********
 106    2022-01-08 01:40    30  ***********
 107    2022-01-08 01:45    31  ************
 ...    ..(  5 skipped).    ..  ************
 113    2022-01-08 02:15    31  ************
 114    2022-01-08 02:20    23  ****
 115    2022-01-08 02:25    25  ******
 116    2022-01-08 02:30    26  *******
 117    2022-01-08 02:35    27  ********
 118    2022-01-08 02:40    28  *********
 119    2022-01-08 02:45    28  *********
 120    2022-01-08 02:50    29  **********
 121    2022-01-08 02:55    29  **********
 122    2022-01-08 03:00    30  ***********
 123    2022-01-08 03:05    30  ***********
 124    2022-01-08 03:10    31  ************
 125    2022-01-08 03:15    26  *******
 126    2022-01-08 03:20    27  ********
 127    2022-01-08 03:25    30  ***********
   0    2022-01-08 03:30    30  ***********
   1    2022-01-08 03:35    30  ***********
   2    2022-01-08 03:40    32  *************
   3    2022-01-08 03:45    33  **************
   4    2022-01-08 03:50    29  **********
   5    2022-01-08 03:55    28  *********
 ...    ..(  2 skipped).    ..  *********
   8    2022-01-08 04:10    28  *********
   9    2022-01-08 04:15    31  ************
  10    2022-01-08 04:20    33  **************
  11    2022-01-08 04:25    34  ***************
  12    2022-01-08 04:30    36  *****************
  13    2022-01-08 04:35    36  *****************
  14    2022-01-08 04:40    37  ******************
  15    2022-01-08 04:45    38  *******************
 ...    ..(  3 skipped).    ..  *******************
  19    2022-01-08 05:05    38  *******************
  20    2022-01-08 05:10    39  ********************
 ...    ..(  7 skipped).    ..  ********************
  28    2022-01-08 05:50    39  ********************
  29    2022-01-08 05:55    40  *********************
 ...    ..(  2 skipped).    ..  *********************
  32    2022-01-08 06:10    40  *********************
  33    2022-01-08 06:15    39  ********************
  34    2022-01-08 06:20    38  *******************
 ...    ..(  2 skipped).    ..  *******************
  37    2022-01-08 06:35    38  *******************
  38    2022-01-08 06:40    39  ********************
 ...    ..( 24 skipped).    ..  ********************
  63    2022-01-08 08:45    39  ********************
  64    2022-01-08 08:50    40  *********************
  65    2022-01-08 08:55    39  ********************
  66    2022-01-08 09:00    39  ********************
  67    2022-01-08 09:05    40  *********************
 ...    ..(  3 skipped).    ..  *********************
  71    2022-01-08 09:25    40  *********************
  72    2022-01-08 09:30    39  ********************
  73    2022-01-08 09:35    39  ********************
  74    2022-01-08 09:40    39  ********************
  75    2022-01-08 09:45    40  *********************
  76    2022-01-08 09:50    40  *********************
  77    2022-01-08 09:55    39  ********************
  78    2022-01-08 10:00    40  *********************
 ...    ..( 11 skipped).    ..  *********************
  90    2022-01-08 11:00    40  *********************
  91    2022-01-08 11:05    39  ********************
 ...    ..(  2 skipped).    ..  ********************
  94    2022-01-08 11:20    39  ********************
  95    2022-01-08 11:25    40  *********************
  96    2022-01-08 11:30    40  *********************
  97    2022-01-08 11:35    23  ****
  98    2022-01-08 11:40    27  ********
  99    2022-01-08 11:45    29  **********
 100    2022-01-08 11:50    31  ************
 101    2022-01-08 11:55    32  *************
 102    2022-01-08 12:00    32  *************

Write SCT (Get) Error Recovery Control Command failed: Read of ATA output registers not implemented [JMicron]
SCT (Get) Error Recovery Control command failed

Device Statistics (GP/SMART Log 0x04) not supported

ATA_READ_LOG_EXT (addr=0x11:0x00, page=0, n=1) failed: 48-bit ATA commands not implemented [JMicron]
Read SATA Phy Event Counters failed

@ashaduri
Copy link
Owner

Thanks, I was able to reproduce the problem with 1.1.3.

This particular issue (when running smartctl or loading existing output) was originally fixed in the main branch in cb1abab.
A fix for all locales (when running smartctl) has been implemented in ad01451.
In the future, JSON output parser should let us avoid these kinds of issues altogether.

@ashaduri ashaduri added this to the 1.1.4 milestone Jan 13, 2022
@ashaduri ashaduri added the fixed The issue has been fixed label Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The issue has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants