Introduction
If you are evaluating a SSD in use for years or in a used machine you just got, this guide will show you how to do basic tests to detect common problems. While these tests are not perfect, they will detect MOST issues.
Common drive problems include:
- High hours (Wear and tear, increased failure risk)
- High wear level usage
- Reallocated sectors
- Pending reallocated sectors
- Hidden problems
Why should used SSDs be checked?
Most failures are sudden and without warning, if not known in advance due to lack of symptoms. If the machine has problems and the issue is caught early, it will give you time to move everything and replace the drive before it fails. While SMART can only do so much, it plays a significant role since the data can be used to catch a failure before it occurs.
Guide notes
- While Parted Magic can be legally redistributed under the GPL, I will not point to these downloads as I cannot verify their authenticity. The ONLY source I trust is the Parted Magic website.
- ($17 single download w/o updates, or $49 yearly/$13 quarterly with a subscription).
- These tests are not 100% accurate. Some problems can (and do) slip past these tests.
A word about bad sector remapping:
- While WD and Seagate offer diagnostic tools for HDDs, fewer tools exist like this for SSDs as they lean on standard commands - however, Samsung has Samsung Magician (Retail only, will not work on "PM" OEM drives) and Crucial (Micron) has Storage Executive, as well as WD/SanDisk. I will add them here as I locate them (and know), but outside of Samsung and Micron/Crucial, no other vendor offers this and relies on SMART commands. These tools WILL NOT CORRECT MAJOR FAILURES. If the issue is minor, it may be correctable with steps like a secure erase or OEM tool, but keep your expectations in check. Drives with lots of issues will likely be unfixable, and the drive will have to be replaced.
- IMPORTANT: If you can do so before testing, back up your system's data, as it can fail during testing if something is too far gone to correct. DO NOT FIX THE DRIVE IF THERE ARE EXCESSIVELY HIGH SMART ERRORS. Back up the data, transfer the data, wipe the old drive, and replace it!
What you need
-
-
They can be purchased here if you cannot salvage one: UGREEN USB to USB C Adapter & USB C to USB Adapter Combo 4-Pack.
-
-
-
Connect the drive internally to your PC (SATA port or secondary M.2 slot), or put the drive into a USB drive adapter.
-
If the hard drive is not installed and you do not have a USB adapter, it can be plugged into a motherboard if you have a free slot.
-
-
-
Start Ubuntu and run sudo apt-get install nvme-cli on the live image.
-
NOTE: The device dev ID can be found in Disks, each machine will be different. After installing nvme-cli, run the following command: sudo nvme smart-log -H /dev/nvmeX (change X for the SSD ID). External SSDs may use /dev/sdbX, but same rule for probing it in CLI applies - just double check with externals.
-
Check the following data first: Percentage used, Data Written, Power on hours, Unsafe shutdown (less critical, but check!), Media errors.
-
-
-
-
Boot your system into a live Linux session. Locate the Disks application and select the SSD you want to test.
-
From the drop-down menu, select SMART Data and Self Tests. This will pull up the SMART data.
-
Locate the following SMART attributes: Power On Hours, Power Cycle Count, Reallocated sector count and wear leveling count.
-
Example of a unnessacarily overencrypted SSD's SMART data.
-
-
-
To run a SMART Extended Self-Test, left click Start Self-Test. Select Extended from the drop-down menu.
-
-
-
In the Attributes tab, locate the following SMART attributes: Available Spare (and Spare Threshold), Percentage used, Data Units (Written), Power Cycles, Power on hours, and Unsafe shutdown (less critical, but check!).
-
To access the NVMe logs, click on NVMe Errors.
-
To test the drive, select Perform Tests. Click Test type: and select Extended Self-Test.
-
-
-
In the event your drive adapter DOES NOT populate the data and shows this, you have to find a different adapter. However, the need for this can be verified in Terminal to make sure it is NOT a GUI issue with the following command: smartctl - H /dev/X (replace X with sdbX, X being the drive number if present).
-
If Terminal just says SMART Health Status: OK, the adapter you picked has issues in Parted Magic (likely due to a chipset blacklist). Pick another adapter as you're flying blind.
-
-
-
Select Disks from the desktop to open GSmartControl.
-
Select the hard disk you want to test. Click Attributes to read the SMART data.
-
Locate the following attributes: Reallocated Sector Count, Power On Time, Power Cycle Count and Wear Leveling Count.
-
In order to check the error logs, click Error Log. Any errors will be stored here. Some drives offer additional data, which can be accessed under Advanced.
-
-
-
AHCI drives (M.2 SATA/2.5" drives/3.5" drives) When possible for security (and in the case of SSDs, reduced or mitigated drive wear), try to use the ATA Secure Erase option when possible, unless the drive has known bugs (see warning above).
-
NVMe SSD Recomendation: When possible, use NVMe secure erase. This is instant because it destroys the encryption key on these drives so the data can no longer be read and does not need to zero out the entire drive.
-
eMMC systems: You must use dd on these - Disk or Shred will erase these systems.
-