Aug 272021
 

This was written a few weeks ago and I just noticed today that it had not been published.

Following on from I bought a new nvme drive – or did I?, I ran stressdisk on it.

[dvl@test ~]$ sudo gpart add -a 4k -t freebsd-zfs nvd0
nvd0p1 added

[dvl@test ~]$ gpart show nvd0
=>       34  500118125  nvd0  GPT  (238G)
         34          6        - free -  (3.0K)
         40  500118112     1  freebsd-zfs  (238G)
  500118152          7        - free -  (3.5K)

[dvl@test ~]$ 

[dvl@test ~]$ sudo zpool create nvd0 /dev/nvd0p1 

[dvl@test ~]$ zpool status nvd0
  pool: nvd0
 state: ONLINE
config:

	NAME        STATE     READ WRITE CKSUM
	nvd0        ONLINE       0     0     0
	  nvd0p1    ONLINE       0     0     0

errors: No known data errors
[dvl@test ~]$ 


[dvl@test ~]$ zfs list -r nvd0
NAME   USED  AVAIL     REFER  MOUNTPOINT
nvd0   372K   231G       96K  /nvd0
[dvl@test ~]$ 

Let’s stressdisk:

[dvl@test ~]$ sudo chown dvl:dvl /nvd0
[dvl@test ~]$ stressdisk -
2021/08/09 14:07:06 statsfile "stressdisk_stats.json" does not exist -- will create
stressdisk - a disk soak testing utility - development version

Automatic usage:
  stressdisk run directory            - auto fill the directory up and soak test it
  stressdisk cycle directory          - fill, test, delete, repeat - torture for flash
  stressdisk clean directory          - delete the check files from the directory

Manual usage:
  stressdisk help                       - this help
  stressdisk [ -s size ] write filename - write a check file
  stressdisk read filename              - read the check file back
  stressdisk reads filename             - ... repeatedly for duration set
  stressdisk check filename1 filename2  - compare two check files
  stressdisk checks filename1 filename2 - ... repeatedly for duration set

Full options:
  -cpuprofile string
    	Write cpu profile to file
  -duration duration
    	Duration to run test (default 24h0m0s)
  -logfile string
    	File to write log to set to empty to ignore (default "stressdisk.log")
  -maxerrors uint
    	Max number of errors to print per file (default 64)
  -nodirect
    	Don't use O_DIRECT
  -s int
    	Size of the check files (default 1000000000)
  -stats duration
    	Interval to print stats (default 1m0s)
  -statsfile string
    	File to load/store statistics data (default "stressdisk_stats.json")
Command "-" not understood
[dvl@test ~]$ 

Let’s try this out:

[dvl@test ~]$ stressdisk run /nvd0/
2021/08/09 14:08:39 statsfile "stressdisk_stats.json" does not exist -- will create
2021/08/09 14:08:39 No check files - generating
2021/08/09 14:08:39 Writing file "/nvd0/TST_0000" size 1000000000
2021/08/09 14:08:40 Writing file "/nvd0/TST_0001" size 1000000000
2021/08/09 14:08:41 Writing file "/nvd0/TST_0002" size 1000000000
2021/08/09 14:08:43 Writing file "/nvd0/TST_0003" size 1000000000
2021/08/09 14:08:44 Writing file "/nvd0/TST_0004" size 1000000000
2021/08/09 14:08:46 Writing file "/nvd0/TST_0005" size 1000000000
...

24 hours later

Bytes read:     140310152 MByte (1633.44 MByte/s)
Bytes written:     235880 MByte ( 491.77 MByte/s)
Errors:                 0
Elapsed time:  24h0m0.000395388s

2021/08/10 14:08:39 Exiting after running for > 24h0m0s
2021/08/10 14:08:39 
Bytes read:     140310152 MByte (1633.44 MByte/s)
Bytes written:     235880 MByte ( 491.77 MByte/s)
Errors:                 0
Elapsed time:  24h0m0.000940539s

2021/08/10 14:08:39 PASSED with no errors
[dvl@test ~]$ sudo smartctl -a /dev/nvme0
smartctl 7.2 2020-12-30 r5155 [FreeBSD 13.0-RELEASE-p3 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       WDC PC SN730 SDBQNTY-256G-1001
Serial Number:                      [redacted]
Firmware Version:                   11170101
PCI Vendor/Subsystem ID:            0x15b7
IEEE OUI Identifier:                0x001b44
Total NVM Capacity:                 256,060,514,304 [256 GB]
Unallocated NVM Capacity:           0
Controller ID:                      8215
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          256,060,514,304 [256 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            001b44 8b4851cd44
Local Time is:                      Tue Aug 10 14:49:16 2021 UTC
Firmware Updates (0x14):            2 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x1e):         Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     84 Celsius
Critical Comp. Temp. Threshold:     88 Celsius
Namespace 1 Features (0x02):        NA_Fields

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     5.00W       -        -    0  0  0  0        0       0
 1 +     3.50W       -        -    1  1  1  1        0       0
 2 +     3.00W       -        -    2  2  2  2        0       0
 3 -   0.0700W       -        -    3  3  3  3     4000   10000
 4 -   0.0035W       -        -    4  4  4  4     4000   40000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         2
 1 -    4096       0         1

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

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        40 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    284,133,817 [145 TB]
Data Units Written:                 706,331 [361 GB]
Host Read Commands:                 1,113,450,299
Host Write Commands:                4,982,661
Controller Busy Time:               1,392
Power Cycles:                       56
Power On Hours:                     28
Unsafe Shutdowns:                   22
Media and Data Integrity Errors:    0
Error Information Log Entries:      1
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0

Error Information (NVMe Log 0x01, 16 of 256 entries)
No Errors Logged
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive