With a non-NVMe drive, I can run:
# hdparm -I /dev/whatever | grep TRIM
Data Set Management TRIM supported (limit 8 block)
Deterministic read data after TRIM
With a Samsung 960 EVO 1TB NVMe drive (PCI Express), I get:
# hdparm -I /dev/nvme0n1
/dev/nvme0n1:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
I can run
# smartctl --all /dev/nvme0n1
And get some information about the drive, but nothing about TRIM type.
I installed nvme-cli
, and ran nvme get-feature -f 0
to -f 0xe
and got some features from the drive, but nothing about TRIM type.
Is there a way in Linux to query an NVME device, to list what type of TRIM it supports?
Is there a way in Linux to query an NVMe device, to get a list of anything else hdparm -I
would show if it weren't an NVMe, that smartctl
and nvme
don't seem to cover?
Best Answer
I understand that TRIM is equivalent to NVME Data Set Management (DSM) Deallocate. If it is supported, it can be applied to 256 regions up to 16 blocks in size each.
Check id-ctrl command oncs.bit2 if it is supported.
These commands can give you more information about the nvme device: