RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1763316 - lshw should report NVMe disk size
Summary: lshw should report NVMe disk size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lshw
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.3
Assignee: lijiang
QA Contact: Jeff Bastian
URL:
Whiteboard:
Depends On:
Blocks: 1771222 1825061
TreeView+ depends on / blocked
 
Reported: 2019-10-18 18:37 UTC by Jeff Bastian
Modified: 2020-11-04 01:59 UTC (History)
3 users (show)

Fixed In Version: lshw-B.02.19.2-2.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:57:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4533 0 None None None 2020-11-04 01:58:06 UTC

Description Jeff Bastian 2019-10-18 18:37:13 UTC
Description of problem:
The lshw tool does not show NVMe disk sizes.  Please extend lshw to show NVMe disk sizes similar to traditional SATA/SCSI drives.

[root@t470s ~]# rpm -q lshw
lshw-B.02.18-21.el8.x86_64

[root@t470s ~]# lsblk
NAME                MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1             259:0    0 238.5G  0 disk 
├─nvme0n1p1         259:1    0   600M  0 part /boot/efi
├─nvme0n1p2         259:2    0     1G  0 part /boot
└─nvme0n1p3         259:3    0 236.9G  0 part 
  ├─rhel_t470s-root 253:0    0    50G  0 lvm  /
  ├─rhel_t470s-swap 253:1    0   7.9G  0 lvm  [SWAP]
  └─rhel_t470s-home 253:2    0   179G  0 lvm  /home

[root@t470s ~]# lshw
t470s.localdomain
    description: Notebook
    product: 20HGS22D0W (LENOVO_MT_20HG_BU_Think_FM_ThinkPad T470s)
    vendor: LENOVO
    version: ThinkPad T470s
    ...
    ...
        *-pci:2
             description: PCI bridge
             product: Sunrise Point-LP PCI Express Root Port #9
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: f1
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:16 memory:ec000000-ec0fffff
           *-nvme
                description: Non-Volatile memory controller
                product: NVMe SSD Controller SM961/PM961
                vendor: Samsung Electronics Co Ltd
                physical id: 0
                bus info: pci@0000:3c:00.0
                version: 00
                width: 64 bits
                clock: 33MHz
                capabilities: nvme pm msi pciexpress msix nvm_express bus_master cap_list
                configuration: driver=nvme latency=0
                resources: irq:16 memory:ec000000-ec003fff
        *-isa
             description: ISA bridge
             ...
             ...

Version-Release number of selected component (if applicable):
lshw-B.02.18-21.el8

How reproducible:
always

Steps to Reproduce:
1. run lshw on a system with an NVMe drive

Actual results:
lshw does not report the size of the NVMe drive

Expected results:
lshw reports the size of the NVMe drive

Additional info:
A SATA SSD for comparison:

        *-sata
             description: SATA controller
             product: Sunrise Point-LP SATA Controller [AHCI mode]
             vendor: Intel Corporation
             physical id: 17
             bus info: pci@0000:00:17.0
             logical name: scsi1
             version: 21
             width: 32 bits
             clock: 66MHz
             capabilities: sata msi pm ahci_1.0 bus_master cap_list emulated
             configuration: driver=ahci latency=0
             resources: irq:124 memory:f1248000-f1249fff memory:f124f000-f124f0ff ioport:e088(size=8) ioport:e090(size=4) ioport:e060(size=32) memory:f124d000-f124d7ff
           *-disk
                description: ATA Disk
                product: SanDisk SD8TN8U5
                physical id: 0.0.0
                bus info: scsi@1:0.0.0
                logical name: /dev/sda
                version: 3101
                serial: redacted
                size: 476GiB (512GB)
                capabilities: gpt-1.00 partitioned partitioned:gpt
                configuration: ansiversion=5 guid=a71893c9-afe6-4b5d-822e-235cc3f74254 logicalsectorsize=512 sectorsize=512
              *-volume:0
                   description: Windows FAT volume
                   vendor: mkfs.fat
                   physical id: 1
                   bus info: scsi@1:0.0.0,1
                   logical name: /dev/sda1
                   logical name: /boot/efi
                   version: FAT32
                   serial: redacted
                   size: 598MiB
                   capacity: 599MiB
                   capabilities: boot fat initialized
                   configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.options=rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro name=EFI System state=mounted
              *-volume:1
                   description: EFI partition
                   physical id: 2
                   bus info: scsi@1:0.0.0,2
                   logical name: /dev/sda2
                   logical name: /boot
                   serial: redacted
                   capacity: 2047MiB
                   configuration: mount.fstype=xfs mount.options=rw,seclabel,relatime,attr2,inode64,noquota name=Linux filesystem state=mounted
              *-volume:2
                   description: EFI partition
                   physical id: 3
                   bus info: scsi@1:0.0.0,3
                   logical name: /dev/sda3
                   serial: redacted
                   size: 474GiB
                   capacity: 474GiB
                   width: 1074632520 bits
                   capabilities: encrypted luks initialized
                   configuration: bits=31139403592 filesystem=luks hash=sha256 name=Linux dm-crypt version=2

Comment 2 lijiang 2020-02-11 03:16:12 UTC
Harry Mallon and ycheng have posted a patch in upstream, here is a github link: https://ezix.org/src/pkg/lshw/pulls/27

I tested this patch, it works, but still need to improve, also discuss in upstream.

So I set the conditional NAK is upstream. And also will move it to rhel8.3.

Thanks.

Comment 5 Jeff Bastian 2020-09-08 21:55:35 UTC
Verified with lshw-B.02.19.2-2.el8.

:::::::::::::::::::
:: Block devices ::
:::::::::::::::::::

[root@dell-per7515-01 ~]# lsblk
NAME                            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1                         259:0    0 745.2G  0 disk 
├─nvme0n1p1                     259:1    0   600M  0 part /boot/efi
├─nvme0n1p2                     259:2    0     1G  0 part /boot
└─nvme0n1p3                     259:3    0 743.6G  0 part 
  ├─rhel_dell--per7515--01-root 253:0    0    50G  0 lvm  /
  ├─rhel_dell--per7515--01-swap 253:1    0  23.5G  0 lvm  [SWAP]
  └─rhel_dell--per7515--01-home 253:2    0 670.2G  0 lvm  /home


::::::::::::
:: Before ::
::::::::::::

[root@dell-per7515-01 ~]# rpm -q lshw
lshw-B.02.18-23.el8.x86_64

[root@dell-per7515-01 ~]# lshw -class disk

[root@dell-per7515-01 ~]# lshw
...
...
              *-pci:3
                   description: PCI bridge
                   product: PLX Technology, Inc.
                   vendor: PLX Technology, Inc.
                   physical id: 3
                   bus info: pci@0000:42:03.0
                   version: b0
                   width: 32 bits
                   clock: 33MHz
                   capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
                   configuration: driver=pcieport
                   resources: irq:45 memory:a6c00000-a6cfffff ioport:47ea0800000 (size=2097152)
                 *-nvme
                      description: Non-Volatile memory controller
                      product: NVMe SSD Controller 172Xa/172Xb
                      vendor: Samsung Electronics Co Ltd
                      physical id: 0
                      bus info: pci@0000:46:00.0
                      version: 01
                      width: 64 bits
                      clock: 33MHz
                      capabilities: nvme pm msi pciexpress msix nvm_express bus_master cap_list
                      configuration: driver=nvme latency=0
                      resources: irq:44 memory:a6c00000-a6c03fff
              *-pci:4
...
...


:::::::::::
:: After ::
:::::::::::

[root@dell-per7515-01 ~]# rpm -q lshw
lshw-B.02.19.2-2.el8.x86_64

[root@dell-per7515-01 ~]# lshw -class disk
  *-namespace               
       description: NVMe disk
       physical id: 1
       bus info: nvme@0:1
       logical name: /dev/nvme0n1
       size: 745GiB (800GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: guid=aac5eccc-26ef-4766-835e-5c5bc5b15c0e logicalsectorsize=512 sectorsize=512 wwid=eui.333959304ab002370025385800000002

[root@dell-per7515-01 ~]# lshw
...
...
              *-pci:3
                   description: PCI bridge
                   product: PLX Technology, Inc.
                   vendor: PLX Technology, Inc.
                   physical id: 3
                   bus info: pci@0000:42:03.0
                   version: b0
                   width: 32 bits
                   clock: 33MHz
                   capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
                   configuration: driver=pcieport
                   resources: irq:45 memory:a6c00000-a6cfffff ioport:47ea0800000(size=2097152)
                 *-nvme
                      description: NVMe device
                      product: Dell Express Flash PM1725a 800GB SFF
                      vendor: Samsung Electronics Co Ltd
                      physical id: 0
                      bus info: pci@0000:46:00.0
                      logical name: /dev/nvme0
                      version: 1.0.4
                      serial: S39YNX0JB00237
                      width: 64 bits
                      clock: 33MHz
                      capabilities: nvme pm msi pciexpress msix nvm_express bus_master cap_list
                      configuration: driver=nvme latency=0 nqn=nqn.2014.08.org.nvmexpress:144d1028      S39YNX0JB00237Dell Express Flash PM1725a 800GB SFF state=live
                      resources: irq:44 memory:a6c00000-a6c03fff
                    *-namespace
                         description: NVMe disk
                         physical id: 1
                         bus info: nvme@0:1
                         logical name: /dev/nvme0n1
                         size: 745GiB (800GB)
                         capabilities: gpt-1.00 partitioned partitioned:gpt
                         configuration: guid=aac5eccc-26ef-4766-835e-5c5bc5b15c0e logicalsectorsize=512 sectorsize=512 wwid=eui.333959304ab002370025385800000002
                       *-volume:0 UNCLAIMED
                            description: Windows FAT volume
                            vendor: mkfs.fat
                            physical id: 1
                            bus info: nvme@0:1,1
                            version: FAT32
                            serial: 5a6b-e16d
                            size: 598MiB
                            capacity: 599MiB
                            capabilities: boot fat initialized
                            configuration: FATs=2 filesystem=fat name=EFI System Partition
                       *-volume:1 UNCLAIMED
                            description: EFI partition
                            physical id: 2
                            bus info: nvme@0:1,2
                            serial: 9f9d5ef1-129f-4953-9d54-5ecbf5326bdb
                            capacity: 1023MiB
                       *-volume:2
                            description: LVM Physical Volume
                            vendor: Linux
                            physical id: 3
                            bus info: nvme@0:1,3
                            logical name: /dev/nvme0n1p3
                            serial: 1tIcKi-qTf8-0V5H-TSwl-4ANd-zcjY-A3zH3J
                            size: 743GiB
                            capabilities: multi lvm2
              *-pci:4
...
...

Comment 8 errata-xmlrpc 2020-11-04 01:57:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lshw bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4533


Note You need to log in before you can comment on or make changes to this bug.