Disk not supported by smartctl, how can I check its healt status?

Hi everyone!

I want to test the health of my disk and I am reading this wiki https://wiki.archlinux.org/title/Smartctl
I run this command # smartctl --info /dev/nvme0n1 | grep 'SMART support is:' but no output in terminal. It means support not available?

But when I run #inxi -Daz it shows SMART: yes


Local Storage: total: 931.51 GiB used: 348.14 GiB (37.4%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 1TB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 4B2QEXM7 temp: 35.9 C scheme: GPT
  SMART: yes health: PASSED on: 34d 2h cycles: 5,350
    read-units: 14,696,762 [7.52 TB] written-units: 19,403,533 [9.93 TB]

Please help me understand this and tell me how I can test the health of ssd if commands in wiki not available for this ssd. Thank you so much!

Does the following command work?

sudo smartctl --info /dev/nvme0n1 | grep 'SMART support is:'

3 Likes

Just running smartctl -i /dev/nvme0n1 gives you the information for this drive. The line which grep is looking for is not there for NVMe devices, that’s why your command fails.

1 Like

Hi! Thank you for reply!

Before I ran command, I did sudo -s in terminal and typed my password.

But sudo smartctl --info /dev/sda | grep 'SMART support is:' shows no output either.

1 Like
SSD 970 EVO Plus 1TB

This nvme device supports smartctl just fine. Please try a different command: smartctl -a /dev/nvme0n1

1 Like

Sorry, I thought it might have been that you were entering the # symbol as part of the command.

I don’t use nvme drives, so it did not occur to me that the support output was not the same as for SATA drives.

Use the command that @emk2203 listed, and/or the one that @mbod listed.

3 Likes

@emk2203, thanks for reply!

I didn’t know that the line was not available for NVMe.

@mbod

I’ll run your command and post result in next post. Thank you!

@Stagger_Lee

No problem, I appreciate your help. I should be more clear about posting commands I do in terminal. Thanks again!

1 Like
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.1-zen1-1-zen] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Samsung SSD 970 EVO Plus 1TB

Firmware Version:                   4B2QEXM7
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity:           0
Controller ID:                      6
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          1,000,204,886,016 [1.00 TB]
Namespace 1 Utilization:            400,530,112,512 [400 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            002538 58115145ba
smartctl -a /dev/nvme0n1 

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.1-zen1-1-zen] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Samsung SSD 970 EVO Plus 1TB

Firmware Version:                   4B2QEXM7
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity:           0
Controller ID:                      6
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          1,000,204,886,016 [1.00 TB]
Namespace 1 Utilization:            400,535,556,096 [400 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            002538 58115145ba

Firmware Updates (0x16):            3 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x0057):     Comp Wr_Unc DS_Mngmt Sav/Sel_Feat Timestmp
Log Page Attributes (0x0f):         S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     82 Celsius
Critical Comp. Temp. Threshold:     85 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     7.54W       -        -    0  0  0  0        0       0
 1 +     7.54W       -        -    1  1  1  1        0     200
 2 +     7.54W       -        -    2  2  2  2        0    1000
 3 -   0.0500W       -        -    3  3  3  3     2000    1200
 4 -   0.0050W       -        -    4  4  4  4      500    9500

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

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

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        36 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    14,696,811 [7.52 TB]
Data Units Written:                 19,404,109 [9.93 TB]
Host Read Commands:                 117,930,078
Host Write Commands:                210,400,742
Controller Busy Time:               2,320
Power Cycles:                       5,350
Power On Hours:                     818
Unsafe Shutdowns:                   230
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               36 Celsius
Temperature Sensor 2:               37 Celsius

Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

Read Self-test Log failed: Invalid Field in Command (0x002)

Is this looking ok?

This looks OK, it’s just the information (-i) or all information, including logs etc ( -a).

What you really want is to see if the self-test passes with ‘OK’.

Try smartctl -t short /dev/nvme0n1 first to see if this works. With NVMe devices, you might need a different approach. Come back with the result of smartctl -l selftest after you ran the test, or the error message if it won’t run the test.

1 Like

The command gives this error


Read Self-test Log failed: Invalid Field in Command (0x002)

Yup, expected as much. Same here. Install the NVMe tools with sudo pacman -S nvme-cli.

Then sudo nvme device-self-test /dev/nvme0n1 -s 1 for the short or -s 2 for the extended test.

Get the output with sudo nvme self-test-log /dev/nvme0n1 | head -n 9. You should get something like

Device Self Test Log for NVME device:nvme0n1
Current operation  : 0
Current Completion : 0%
Self Test Result[0]:
  Operation Result             : 0
  Self Test Code               : 2
  Valid Diagnostic Information : 0
  Power on hours (POH)         : 0x10
  Vendor Specific              : 0 0

Operation result 0 means test is passed with OK, line 2 is type of test (after the -s from the last command).

1 Like

@emk2203

Thanks again for your instructions!

The extended test is running. When is finished, I post the output.

I found before on Github a thread with same error as for me but no solution:

1 Like

There is a solution to work around the quirk in the smartmontools in the link you posted:

smartctl -d nvme,0xffffffff -l selftest /dev/nvme0n1 works for me, it should work for you as well.

Thanks for the link. Didn’t know that.

Playing around:

smartctl -d nvme,0xffffffff -t short /dev/nvme0n1 also works to start the test.

1 Like

The output of the extended test:


nvme self-test-log /dev/nvme0n1 | head -n 9 
Device Self Test Log for NVME device:nvme0n1
Current operation  : 0
Current Completion : 0%
Self Test Result[0]:
  Operation Result             : 0
  Self Test Code               : 2
  Valid Diagnostic Information : 0
  Power on hours (POH)         : 0x332
  Vendor Specific              : 0 0

Operation Result : 0
This seems good!

I am trying.

 smartctl -d nvme,0xffffffff -t short /dev/nvme0n1 
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.1-zen1-1-zen] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Self-test has begun
Use smartctl -X to abort test

Looks working!

Yes, this looks positive.

If this solves the issue (how to get the health status), please mark it as solved. This helps future people with a similar problem.

1 Like

Yes. Thank you so much for the help @emk2203!

Thank you to @mbod and @Stagger_Lee too!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.