メインコンテンツにスキップ

Diagnosing and Erasing SSDs (Solid State Drive)

必要な工具と部品

  1. Diagnosing and Erasing SSDs (Solid State Drive), Mounting the hard drive for testing: 手順 1、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Mounting the hard drive for testing: 手順 1、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Mounting the hard drive for testing: 手順 1、 3の画像 3
    • IF YOUR MACHINE SUPPORTS USB-C, FAVOR TYPE-C WHEN BUYING AN ADAPTER. USB-A enclosures are a mixed bag, but most support UAS if it is a true USB3 UASP adapter/cable. If your computer has USB-C, buy a Type-C adapter to avoid the hassle. If you do not have USB-C, look for a USB-A enclosure with true USB 3.0 or 3.1 support with UAS.

    • IMPORTANT: Adapters with 4 pins and a blue interface are "fake" USB3, and these rarely support UAS. These will have an issue, and you will probably need to buy another one. You can try, but be prepared to send it back. It must have 6 pins. If you can find a USB-C>USB-A adapter to make a USB-C one work, this bypasses a lot of this nonsense.

    • This guide assumes the boot drive has been created beforehand. If you need instructions on how to make a bootable USB, refer to this guide.

    • If you are testing an M.2 SSD (AHCI or NVMe) outside of the computer (be it inside the laptop or M.2 slot on the desktop motherboard), you will need an enclosure specially built for this. It must support NVMe with NVMe drives, or AHCI for older M.2 SSDs.

    • 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.

  2. Diagnosing and Erasing SSDs (Solid State Drive), Author's Note:: 手順 2、 2の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Author's Note:: 手順 2、 2の画像 2
    • You can buy these commercially if you do not have a broken Poly headset to pilfer one from, but they are typically only sold online. search for "USB-C to USB-A adapter" and look for one in this format.

    • This is the adapter that can be used to "make" USAP Type C USB adapters work on legacy PCs. I ripped this one off of a Poly headset at work that was being thrown out and kept it for this purpose:

  3. Diagnosing and Erasing SSDs (Solid State Drive), Linux - locating the device ID: 手順 3、 1の画像 1
    • These steps will work on ANY Debian based Linux distro with Debian packages. However, you must be online temporarily for installation purposes. This is not needed for systems with a permanent installation that is in active use.

    • This can be located in Terminal with sudo nvme list (NVMe only) or lsblk -o NAME,MODEL,SERIAL,SIZE,TYPE,ROTA (SATA). However, Disks will show it without terminal knowledge.

  4. Diagnosing and Erasing SSDs (Solid State Drive), Linux - NVMe: 手順 4、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Linux - NVMe: 手順 4、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Linux - NVMe: 手順 4、 3の画像 3
    • These steps will work on ANY Debian based Linux distro with Debian packages. However, you must be online temporarily for installation purposes. This is not needed for systems with a permanent installation that is in active use.

    • These steps are unique to NVMe SSDs. They do not apply to SATA SSDs.

    • Start Ubuntu and run sudo apt-get install nvme-cli on the live image.

    • -H can be replaced with -B but this data will need to be converted from binary to hex to be human readable.

    • 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.

  5. Diagnosing and Erasing SSDs (Solid State Drive), Linux, SATA SSDs - SMART data check: 手順 5、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Linux, SATA SSDs - SMART data check: 手順 5、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Linux, SATA SSDs - SMART data check: 手順 5、 3の画像 3
    • These steps will work on ANY Debian based Linux distro with Debian packages. However, you must be online temporarily for installation purposes. This is not needed for systems with a permanent installation that is in active use.

    • Some SSDs (example shown: PNY CS900) do not properly relay SMART data. Nothing can be done about this, as the vendor chose to encrypt the data unnecessarily.

    • GSmartControl can be used in Ubuntu if you cannot read the output from Disks.

    • 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.

  6. Diagnosing and Erasing SSDs (Solid State Drive), Linux - SMART testing: 手順 6、 1の画像 1
    • If the Percentage used is near 100% (name might be different per SSD vendor), the drive must be replaced; it will likely keep working, but is at high risk of failing and it will be sudden. High usage isn't an issue, but the lifespan will be very limited. For testing, while SMART Extended is better, a quick test may be sufficient.

    • Ubuntu is not required for this step as long as the distro supports the ATA SMART access commands out of the box, such as distros like Debian.

    • eMMC devices do not present SMART data. This is normal on these eMMC Non-UFS devices. UFS devices might present SMART data if it is implemented on your machine.

    • To run a SMART Extended Self-Test, left click Start Self-Test. Select Extended from the drop-down menu.

  7. Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - NVMe: 手順 7、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - NVMe: 手順 7、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - NVMe: 手順 7、 3の画像 3
    • NVMe drives give different data than SATA SSDs - different metrics are used compared to SATA SSDs.

    • 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.

  8. Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - If no data shows: 手順 8、 2の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - If no data shows: 手順 8、 2の画像 2
    • If this occurs, read on - you MIGHT be able to salvage the situation.

    • 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.

  9. Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - SATA: 手順 9、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - SATA: 手順 9、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - SATA: 手順 9、 3の画像 3
    • While high hours are not an indication of failure, the odds of a failure are much higher.

    • 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.

  10. Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - Erasing hard drives: 手順 10、 3の画像 1 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - Erasing hard drives: 手順 10、 3の画像 2 Diagnosing and Erasing SSDs (Solid State Drive), Parted Magic - Erasing hard drives: 手順 10、 3の画像 3
    • Avoid using Nwipe on SSDs. This will eat into the TBW of the drive, which can cause problems on older 75TBW drives.

    • The options available here that will work will vary based on what is supported by the firmware on the drive.

    • CAUTION: SATA SSDs with known firmware issues could be bricked with the ATA Secure Erase command set if the bug is severe. If you are easing a drive with known bad firmware with a high chance of bricking the SSD, select EXTERNAL for safety (at the expense of time/NAND flash wear on SSDs).

    • IF the drive does not support ATA Secure Erase (primarily older drives, extremely rare with SSDs), select External and use Shred or Disk to erase the drive. DO NOT USE Nwipe - THIS PUTS UNECESSARY WEAR ON SSDs

    • 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.

ゴール

Nick

メンバー登録日: 11/10/09

98,270 ポイント

62のガイドは作成済み

0件のガイドコメント

コメントを追加

統計データ:

過去 24時間: 12

過去 7 日: 152

過去 30 日: 152

今までの合計 152