6

I want to test my SSD. It seems that I can start a self test with smartctl, but when I try to display test's results, I don't see anything.

My SDD's model is PNY CS3030 250GB SSD:

$ lsblk -d -o name,model /dev/nvme0n1
NAME    MODEL
nvme0n1 PNY CS3030 250GB SSD

I make sure that SMART is enabled on it:

$ sudo smartctl -s on /dev/nvme0n1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-121-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

Then I start the test:

$ sudo smartctl -t short /dev/nvme0n1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-121-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

Then I try to see the results of the test - but smartctl does not display any:

$ sudo smartctl -l selftest /dev/nvme0n1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-121-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

And that's all. No information about any test running, having failed, nothing. I tried to repeat this command after an hour (maybe I should wait until the test is done), but still no result.

What's going on here?

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
user983447
  • 531
  • 2
  • 8
  • 16

1 Answers1

6

smartctl doesn't quite work with NVMe drives except polling their current health status. Maybe it's going to support these things in the future but the current stable version 7.3 doesn't.

The self-test log can be fetched using this command (all the commands below must be run under root or sudo):

nvme self-test-log /dev/nvme0

Self Test Codes 1 and 2 correspond to short and extended self-tests, Operation Result 0 means the test completed error-free.

To run self-tests you have two options (actually more):

nvme device-self-test /dev/nvme0 -s 2h # Start a extended device self-test operation
nvme device-self-test /dev/nvme0 -s 1h # Start a short device self-test operation

I had a sort of chat with an NVME developer a year ago, that's where I got all this information from. Now it's available in man pages (for nvme-cli version 2.0 and higher) but not in all distros.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64