0

I am using a couple SAS SSDs. A while ago I started a "background long test" on one of them, unfortunately there was a blackout and the test was therefore interrupted. After the power was back again, I re-run the background long test, and this time, it succeeded. However, I have now in my SCSI LOG PAGE a nasty entry like the following (entry #3 in the self test log)

SMART Self-test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background long   Completed                   -   48721                 - [-   -    -]
# 2  Background long   Completed                   -   48253                 - [-   -    -]
# 3  Background long   Self test in progress ...   8   48251                 - [-   -    -]

it is clearly a wrong entry and it irritates me a lot, because this test is definitely aborted due to the power cut. I know it is possible with the sg_utils package to manipulate certain log pages. For instance, with sg_logs -R /dev/sda one can reset the statistical counters on how many gigabytes were read/written. So I wonder, is it somehow possible to clear the self test log as well? According to the sg_utils manual I think yes, but I don't understand yet how. I just want to clear this self test log as it annoys me a lot when looking at my disks - I regularly run the tests and from time to time, I scroll through the test results and then this one is always standing out a bit. Can I probably clear all this by a FORMAT UNIT command?

1 Answer 1

2

You should start with sg_logs -ll /dev/sda to see which log pages are accessible on your disk. You can compare that to the listing produced by sg_logs --enumerate, which lists all the possible log pages sg_logs knows about.

According to the sg_logs --enumerate listing and page 302 of this document, the Self-Test Results is page code 10h, subpage 00h.

So the command to clear the self-test log would be something like:

sg_log --reset --page=0x10 /dev/sda

The FORMAT UNIT command deals with the data storage space that's visible to the host system, and I'd generally expect the diagnostic logs be separate from that. So by using FORMAT UNIT, you'd lose the files stored on your disks, but not the self-test logs.

1
  • this indeed works, however, it depends on the drive model, which pages can be reset. For example, the self test page, I am unable to reset. On the other hand, the error counters (ECC recovered and so on) can indeed be reset :-) Commented Sep 16, 2024 at 8:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.