Skip to content

nvme-cli improvement for the lbaf related info with json output and --verbose #2811

@yizhanglinux

Description

@yizhanglinux

It's better to output the actual data size with json format and verbose params.

# nvme id-ns --verbose  /dev/nvme0n1
---snip---
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x1 Better
LBA Format  1 : Metadata Size: 8   bytes - Data Size: 512 bytes - Relative Performance: 0x3 Degraded (in use)
LBA Format  2 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best
LBA Format  3 : Metadata Size: 8   bytes - Data Size: 4096 bytes - Relative Performance: 0x2 Good
LBA Format  4 : Metadata Size: 64  bytes - Data Size: 4096 bytes - Relative Performance: 0x3 Degraded
# nvme id-ns --verbose --output-format=json   /dev/nvme0n1 | jq ".lbafs"
[
  {
    "ms": 0,
    "ds": 9,
    "rp": 1
  },
  {
    "ms": 8,
    "ds": 9,
    "rp": 3
  },
  {
    "ms": 0,
    "ds": 12,
    "rp": 0
  },
  {
    "ms": 8,
    "ds": 12,
    "rp": 2
  },
  {
    "ms": 64,
    "ds": 12,
    "rp": 3
  }
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions