brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: smartctl -a on an NVMe drive shows wear and spare capacity in smart

Smart
~/tips/tip-smart-smartctl-nvme-wear

sudo smartctl -a /dev/nvme0

Shows wear, spare capacity and error counts of an NVMe drive.

NVMe drives have no reallocated sector counter. The useful numbers have different names.

sudo smartctl -a /dev/nvme0
sudo smartctl -x /dev/nvme0

Look at Percentage Used (wear against the rated endurance, it can pass 100), Available Spare against its threshold, Media and Data Integrity Errors and Critical Warning. -x adds the error log and more detail. Use the controller device /dev/nvme0 or a namespace such as /dev/nvme0n1. Write the numbers down once in a while, since the trend says more than a single reading. A spare below its threshold is a reason to replace the drive.

Further reading: smartctl manual page

More Smart tips sudo nvme smart-log /dev/nvme0 sudo smartctl -q silent -a /dev/sda sudo smartctl -l devstat /dev/sda sudo smartctl -l scttemphist /dev/sda sudo smartctl -t select,1000000-2000000 /dev/sda All Smart tips (19) All topics

Link