How do you check the health of an NVMe ssd using smartctl on Ubuntu?
My laptop, which has a NVMe solid state drive, has been crashing somewhat frequently recently with strange disk read errors. Fortunately, rebooting has temporarily resolved the issue, but I'm trying confirm that the issue is a degraded ssd and not something else, like a faulty motherboard.
The general usage for smartctl is to run something like:
sudo smartctl -i /dev/sdX
However, NVMe don't mount like that. They're mounted using the nvm* prefix and with an extra layer of mount points, showing:
ls -lah /dev/nv*
crw------- 1 root root 238, 0 Oct 31 10:11 /dev/nvme0
brw-rw---- 1 root disk 259, 0 Oct 31 10:11 /dev/nvme0n1
brw-rw---- 1 root disk 259, 1 Oct 31 10:11 /dev/nvme0n1p1
brw-rw---- 1 root disk 259, 2 Oct 31 10:11 /dev/nvme0n1p2
brw-rw---- 1 root disk 259, 3 Oct 31 10:11 /dev/nvme0n1p3
crw------- 1 root root 10, 144 Oct 31 10:11 /dev/nvram
Which of these do I check? The /dev/nvme0n1p2
is my primary data partition, but I also want to make sure the others aren't corrupt, so presumably I would want to check one of the "parent" partitions.
Do I check /dev/nvme0
or /dev/nvme0n1
?