Skip to content

Instantly share code, notes, and snippets.

@Rodney-Smith
Last active May 11, 2021 21:24
Show Gist options
  • Save Rodney-Smith/653a790a2a1e7528158b33b170dd6a4c to your computer and use it in GitHub Desktop.
Save Rodney-Smith/653a790a2a1e7528158b33b170dd6a4c to your computer and use it in GitHub Desktop.
Raspberry Pi Geekworm X829 Dual 2.5" SATA SSD Shield

Commands for testing hdd with smartctl

install smartmontools

$ sudo apt-get install smartmontools

edit "/var/lib/smartmontools/drivedb/drivedb.h" and add the following text:

{ "USB: ; ASMedia", // Geekworm X829
  "0x174c:0x0829",
  "",
  "",
  "-d sat"
},

Show all information for device

$ sudo smartctl --xall /dev/sda
$ sudo smartctl --health /dev/sda

Enable/disable SMART features on device (on/off)

$ sudo smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda
$ sudo smartctl --smart=off --offlineauto=off --saveauto=off /dev/sda

Start disk test,

$ sudo smartctl -i -d sat /dev/sda
$ sudo smartctl -t long -d sat /dev/sda -T permissive

then it will say something like:

Testing has begun.
Please wait 10 minutes for test to complete.
Test will complete after Mon May 10 06:35:39 2021

after its completion,

$ sudo smartctl -l selftest -d sat /dev/sda -T permissive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment