Disques pcie

Mise à jour Debian : 10.10 / Buster

On s’intéresse ici aux disques SSD avec interface pcie

Sommaire

1 - Identification

$ ls /dev/nvme0*
/dev/nvme0 /dev/nvme0n1p1 /dev/nvme0n1p3
/dev/nvme0n1 /dev/nvme0n1p2 /dev/nvme0n1p4
$ ls -l /sys/block/nvme0n*
... /sys/block/nvme0n1 -> ../devices/pci0000:00/0000:00:1d.0/0000:01:00.0/nvme/nvme0/nvme0n1
$ ls /dev/disk/by-path |grep nvme
pci-0000:01:00.0-nvme-1
pci-0000:01:00.0-nvme-1-part1
pci-0000:01:00.0-nvme-1-part2
pci-0000:01:00.0-nvme-1-part3
pci-0000:01:00.0-nvme-1-part4
$ lspci -k -s 01:00.0
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a809
Subsystem: Samsung Electronics Co Ltd Device a801
Kernel driver in use: nvme
Kernel modules: nvme
$ sudo blkid /dev/nvme0n1
/dev/nvme0n1: PTUUID="0fce722d-c992-4e4d-990a-ca32c3344407" PTTYPE="gpt"

$ lsblk -d -D -o name,model,serial,size /dev/nvme0n1
NAME MODEL SERIAL SIZE
nvme0n1 Samsung SSD 980 1TB S649NJ0R206964F 931,5G
$ lsscsi -t
[2:0:0:0] disk sata:50026b767a012c69 /dev/sda
[3:0:0:0] disk usb:2-4.1:1.0 /dev/sdb
[N:0:5:1] disk pcie 0x144d:0xa801 /dev/nvme0n1

2 - Outils

2.1 - Outils standard disques ATA

$ sudo hdparm -I /dev/nvme0n1

/dev/nvme0n1:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device


$ sudo hddtemp /dev/nvme0n1
ERREUR: /dev/nvme0n1: impossible de déterminer le type de bus (ou ce type de bus est inconnu)
$ sudo smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device

$ sudo smartctl --scan -d nvme
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
$ sudo smartctl -i /dev/nvme0n1
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-17-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 980 1TB
Serial Number: S649NJ0R206964F
Firmware Version: 1B4QFXO7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 1 000 204 886 016 [1,00 TB]
Unallocated NVM Capacity: 0
Controller ID: 5
Number of Namespaces: 1
Namespace 1 Size/Capacity: 1 000 204 886 016 [1,00 TB]
Namespace 1 Utilization: 26 016 530 432 [26,0 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 002538 d211401be9
Local Time is: Wed Sep 8 20:03:20 2021 CEST

2.2 - Outils spécifiques pcie

$ aptitude versions nvme-cli
i 1.7-1 stable 500
p 1.12-1 testing 10

$ sudo aptitude install nvme
Description
Description : userspace tooling to control NVMe drives
NVMe is a fast, scalable, direct attached storage interface, accessing solid state drives
through PCIe.

The nvme CLI contains core management tools with minimal dependencies.
$ sudo nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 S465NX0KA72576V Samsung SSD 970 EVO 250GB 1 65,75 GB / 250,06 GB 512 B + 0 B 2B2QEXE7
$ sudo nvme id-ctrl /dev/nvme0 |egrep "mn |fr " 
mn : Samsung SSD 970 EVO 250GB
fr : 2B2QEXE7
$ sudo nvme smart-log /dev/nvme0 |grep -i temperature
temperature : 31 C
Warning Temperature Time : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1 : 31 C
Temperature Sensor 2 : 30 C