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 2045953 - 'virsh nodedev-list --cap storage' doesn't list host nvme storage
Summary: 'virsh nodedev-list --cap storage' doesn't list host nvme storage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.1
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Han Han
URL:
Whiteboard:
Depends On:
Blocks: 2002451
TreeView+ depends on / blocked
 
Reported: 2022-01-26 03:13 UTC by Yiding Liu (Fujitsu)
Modified: 2022-11-15 10:37 UTC (History)
9 users (show)

Fixed In Version: libvirt-8.1.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2056673 (view as bug list)
Environment:
Last Closed: 2022-11-15 10:03:03 UTC
Type: Bug
Target Upstream Version: 8.1.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-109723 0 None None None 2022-01-26 03:16:39 UTC
Red Hat Product Errata RHSA-2022:8003 0 None None None 2022-11-15 10:03:22 UTC

Description Yiding Liu (Fujitsu) 2022-01-26 03:13:53 UTC
Description of problem:
'virsh nodedev-list --cap storage' doesn't list host nvme storage

Version-Release number of selected component (if applicable):
I tested with below 2 pkgs. Both of them have this erro.
libvirt-8.0.0-1.module+el8.6.0+13888+55157bfb.aarch64
libvirt-7.10.0-1.module+el8.6.0+13879+1439f356.src.rpm

How reproducible: 100%


Steps to Reproduce:
1. Enter a host with nvme storage
# lsblk
NAME                                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1                              259:0    0 894.3G  0 disk 
├─nvme0n1p1                          259:1    0   600M  0 part /boot/efi
├─nvme0n1p2                          259:2    0     1G  0 part /boot
└─nvme0n1p3                          259:3    0 892.7G  0 part 
  ├─rhel_hpe--apollo80--01--n01-root 253:0    0    70G  0 lvm  /
  ├─rhel_hpe--apollo80--01--n01-swap 253:1    0    16G  0 lvm  [SWAP]
  └─rhel_hpe--apollo80--01--n01-home 253:2    0 806.7G  0 lvm  /home

2. Run 'virsh nodedev-list --cap storage' and check return code
# virsh nodedev-list --cap storage

# echo $?
0


Actual results: 
Nothing output but return success.


Expected results:
List nvme device
E.g.
# lsblk 
NAME                             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                                8:0    0 465.8G  0 disk 
├─sda1                             8:1    0   600M  0 part /boot/efi
├─sda2                             8:2    0     1G  0 part /boot
└─sda3                             8:3    0 464.2G  0 part 
  ├─rhel_gigabyte--r120--01-root 253:0    0    70G  0 lvm  /
  ├─rhel_gigabyte--r120--01-swap 253:1    0    32G  0 lvm  [SWAP]
  └─rhel_gigabyte--r120--01-home 253:2    0 362.2G  0 lvm  /home
# virsh nodedev-list --cap storage
block_sda_WDC_WD5003ABYZ_011FA0_WD_WMAYP0N9FMDU

Additional info:

Comment 1 Yiding Liu (Fujitsu) 2022-01-26 03:16:37 UTC
From @lizhu. Set the bug as all platform.
```

Lili Zhu
11:12 AM (2 minutes ago)
to me, s3-bug-review

Hi,Yiding

I tested on x86
libvirt-8.0.0-1.el9.x86_64
# lsblk
NAME                             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                                8:0    0 558.4G  0 disk
├─sda1                             8:1    0     1G  0 part /boot
└─sda2                             8:2    0 557.4G  0 part
  ├─rhel_dell--per730--37-root   253:0    0    70G  0 lvm  /
  ├─rhel_dell--per730--37-swap   253:1    0  15.7G  0 lvm  [SWAP]
  └─rhel_dell--per730--37-home   253:3    0 471.7G  0 lvm  /home
nvme0n1                          259:0    0   1.1T  0 disk
├─nvme0n1p1                      259:1    0     1G  0 part
└─nvme0n1p2                      259:2    0   1.1T  0 part
  ├─rhel_dell--per730--3700-swap 253:2    0  15.7G  0 lvm  
  ├─rhel_dell--per730--3700-home 253:4    0     1T  0 lvm  
  └─rhel_dell--per730--3700-root 253:5    0    70G  0 lvm  

# virsh nodedev-list --cap storage
block_sda_361866da06615c000278963e4096def72
(no nvme)

```

Comment 2 Michal Privoznik 2022-01-26 13:14:23 UTC
Patches posted on the list:

https://listman.redhat.com/archives/libvir-list/2022-January/msg01185.html

Comment 3 Michal Privoznik 2022-01-27 07:54:54 UTC
Merged upstream as:

f103976ff3 node_device: Treat NVMe disks as regular disks
ec9e2adb96 node_device: Rework udevKludgeStorageType()

v8.0.0-199-gf103976ff3

Comment 7 Nitesh Narayan Lal 2022-02-21 17:50:23 UTC
Hi Masa,

Can you please help us understand what is the impact (severity) of this bug for FJ?
Is there an expectation that this needs to be fixed in 8.7?

I am asking because if that is the case then we should create a clone for the bug so that we don't miss it.

Thanks

Comment 8 Masayoshi Mizuma (Fujitsu) 2022-02-21 18:21:37 UTC
Hi Nitesh,

Thank you for asking! Yes, Fujitsu expects the fix is backported to 8.7 as well.

Comment 9 Masayoshi Mizuma (Fujitsu) 2022-02-21 19:23:01 UTC
I have cloned this BZ for RHEL8: Bug 2056673

Comment 10 Lili Zhu 2022-03-22 09:32:07 UTC
Tested with:
libvirt-8.1.0-1.el9.x86_64

# lsblk 
NAME                           MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                              8:0    0 558.4G  0 disk 
├─sda1                           8:1    0     1G  0 part /boot
└─sda2                           8:2    0 557.4G  0 part 
  ├─rhel_dell--per730--37-root 253:0    0    70G  0 lvm  /
  ├─rhel_dell--per730--37-swap 253:1    0  15.7G  0 lvm  [SWAP]
  └─rhel_dell--per730--37-home 253:2    0 471.7G  0 lvm  /home
nvme0n1                        259:0    0   1.1T  0 disk 

enumerate storage devices on this host
# virsh nodedev-list --cap storage
block_nvme0n1_INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN
block_sda_361866da06615c000278963e4096def72


nvme disk is listed

Comment 14 Han Han 2022-05-12 03:58:18 UTC
Works on libvirt-8.3.0-1.el9.x86_64:
➜  ~ virsh nodedev-list --cap storage 
block_nvme0n1_INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN

➜  ~ virsh nodedev-dumpxml block_nvme0n1_INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN
<device>
  <name>block_nvme0n1_INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN</name>
  <path>/sys/devices/pci0000:80/0000:80:03.2/0000:87:00.0/nvme/nvme0/nvme0n1</path>
  <devnode type='dev'>/dev/nvme0n1</devnode>
  <devnode type='link'>/dev/disk/by-id/nvme-INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN</devnode>
  <devnode type='link'>/dev/disk/by-id/nvme-nvme.8086-4254504638313234304451303150324a474e-494e54454c205353445045444d583031325437-00000001</devnode>
  <devnode type='link'>/dev/disk/by-path/pci-0000:87:00.0-nvme-1</devnode>
  <parent>pci_0000_87_00_0</parent>
  <capability type='storage'>
    <block>/dev/nvme0n1</block>
    <drive_type>disk</drive_type>
    <model>INTEL SSDPEDMX012T7</model>
    <serial>INTEL_SSDPEDMX012T7_BTPF81240DQ01P2JGN</serial>
    <size>1200243695616</size>
    <logical_block_size>512</logical_block_size>
    <num_blocks>2344225968</num_blocks>
  </capability>
</device>

Comment 18 errata-xmlrpc 2022-11-15 10:03:03 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 (Low: libvirt security, 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/RHSA-2022:8003


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