Skip to content

Instantly share code, notes, and snippets.

@feiyax
Last active October 4, 2024 21:01
Show Gist options
  • Save feiyax/2989b628b389906b2bf16772ba00b48a to your computer and use it in GitHub Desktop.
Save feiyax/2989b628b389906b2bf16772ba00b48a to your computer and use it in GitHub Desktop.
SSD NVMe 4K Block Size Support

Here to document the SSDs i came acorss regarding their support to 4K block size.

The context is that while the majority of NAND uses 4K page size at the lowest level, many SSDs still expose itself as 512-byte sector size. NVMe has an optional feature to toggle the device between different block size, but information regarding this feature isn't easily available from vendors. That means some SSDs can be set to show 4K sector size to OS, some cannot.

nvme-cli command used:

dev=/dev/nvme0n1; sudo sh -c "\
    nvme id-ctrl $dev | \
    grep '^\(mn\|fr\)\s' ; \
    nvme id-ns -H $dev | grep '^LBA'"

Sample output:

root:~# dev=/dev/nvme0n1; sudo sh -c "\
>     nvme id-ctrl $dev | \
>     grep '^\(mn\|fr\)\s' ; \
>     nvme id-ns -H $dev | grep '^LBA'"
mn        : Samsung SSD 980 PRO with Heatsink 2TB
fr        : 5B2QGXA7
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0 Best (in use)

Table

SSD Name FW Version LBA supports note
Samsung SSD 980 PRO with Heatsink 2TB 5B2QGXA7 512B + 0
CT2000P5PSSD8 P7CR403 512B + 0 Crucial P5 Plus 2TB
Samsung SSD 970 EVO 1TB 2B2QEXE7 512B + 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment