Skip to content

Drive's "Total NVM Capacity" is coming as 0B when using extended metadata (like 4k+16B/4k+64) under nvme-cli. #3062

@sarabjotsoit

Description

@sarabjotsoit

Setup:

OS: Ubuntu 24.04
Kernel: 6.18.0-rc2-tls-102325+

Issue Description:

Total NVM Capacity is coming as 0B when using extended metadata using nvme-cli

From nvme-cli:

[mlx5/mlx5]kazan@perf-128-21:~$ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme2n1          /dev/ng2n1            S79JNG0Y400030       SAMSUNG MZ3LO1T9HCJR-00A07               0x1          4.10  kB /   0.00   B      4 KiB + 16 B   OPPA6B5Q

Capacity is coming up fine with smartctl, looks to be issue with nvme-cli

sudo smartctl -a /dev/nvme2
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.18.0-rc2-tls-102325+] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number:                       SAMSUNG MZ3LO1T9HCJR-00A07
Serial Number:                      S79JNG0Y400030
Firmware Version:                   OPPA6B5Q
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 1,920,383,410,176 [1.92 TB]
Unallocated NVM Capacity:           0
Controller ID:                      3
NVMe Version:                       1.4
Number of Namespaces:               128
Local Time is:                      Wed Dec 17 20:33:58 2025 PST
Firmware Updates (0x17):            3 Slots, Slot 1 R/O, no Reset required
Optional Admin Commands (0x007f):   Security Format Frmw_DL NS_Mngmt Self_Test Directvs MI_Snd/Rec
Optional NVM Commands (0x00df):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp Verify
Log Page Attributes (0x1e):         Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg
Maximum Data Transfer Size:         8 Pages
Warning  Comp. Temp. Threshold:     77 Celsius
Critical Comp. Temp. Threshold:     85 Celsius
A few side effects:

Not able to create the FS on the drives as the reported size is zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions