0

How can you verify if a disk is fresh and has had no write from the factory? I have a client that needs to make sure that the disks he revived are cleaned and weren't tampered with from the time it left to the factory till it was in his possession. I unboxed a server (which has no OS on it, there were no partitions on the disk) and this is what I saw

root@ubuntu:~# smartctl   -l devstat /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-42-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 3) ==
0x01  0x008  4              60  ---  Lifetime Power-On Resets
0x01  0x010  4              93  ---  Power-on Hours
0x01  0x018  6      5358239516  ---  Logical Sectors Written
0x01  0x020  6         5284840  ---  Number of Write Commands
0x01  0x028  6           86108  ---  Logical Sectors Read
0x01  0x030  6            3040  ---  Number of Read Commands
0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
0x04  0x010  4              66  ---  Resets Between Cmd Acceptance and Completion
0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
0x05  0x008  1              26  ---  Current Temperature
0x05  0x010  1              29  ---  Average Short Term Temperature
0x05  0x018  1               -  ---  Average Long Term Temperature
0x05  0x020  1              43  ---  Highest Temperature
0x05  0x028  1              20  ---  Lowest Temperature
0x05  0x030  1              34  ---  Highest Average Short Term Temperature
0x05  0x038  1              29  ---  Lowest Average Short Term Temperature
0x05  0x040  1               -  ---  Highest Average Long Term Temperature
0x05  0x048  1               -  ---  Lowest Average Long Term Temperature
0x05  0x050  4               0  ---  Time in Over-Temperature
0x05  0x058  1              70  ---  Specified Maximum Operating Temperature
0x05  0x060  4               0  ---  Time in Under-Temperature
0x05  0x068  1               0  ---  Specified Minimum Operating Temperature
0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
0x06  0x008  4             142  ---  Number of Hardware Resets
0x06  0x010  4              60  ---  Number of ASR Events
0x06  0x018  4               0  ---  Number of Interface CRC Errors
0x07  =====  =               =  ===  == Solid State Device Statistics (rev 1) ==
0x07  0x008  1               0  ---  Percentage Used Endurance Indicator
                                    |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

When a drive is made are there tests that are done? How do I verify that the disk that I got is clean and has 0 bytes written to it? I understand I can use scrub (as described here https://linoxide.com/linux-command/commands-wipe-disk-linux/) but I would rather not have the wear and tear if I didn't need to.

Dovid Bender
  • 427
  • 2
  • 7
  • 19
  • That sure looks like a drive that was erased at some point. If you really want to know what happened to the drive between manufacturing and when you received it, you should have a chat with the vendor. – Michael Hampton Aug 11 '20 at 22:56
  • The issue is how do we trust the vendor. The concern is bad actors along the way. – Dovid Bender Aug 11 '20 at 23:00
  • If you can't trust the vendor, pull the drive out and throw it in a crusher. Of course you'll have to destroy the whole server, too. – Michael Hampton Aug 11 '20 at 23:09

1 Answers1

0

You're gonna need command hdparm switch/option capital "i" or "I" will give you all the info you need. There is an info providing total spin time.

$ sudo hdparm -I /dev/sda
Geeky Masters
  • 729
  • 3
  • 8