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 1328771 - sd: ID_SERIAL and ID_SERIAL_SHORT should use ID_SCSI_SERIAL if avaiable
Summary: sd: ID_SERIAL and ID_SERIAL_SHORT should use ID_SCSI_SERIAL if avaiable
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 09:17 UTC by yduan
Modified: 2020-12-15 07:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:41:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yduan 2016-04-20 09:17:20 UTC
Description of problem:
  Can not display serial number correctly when with wwn.

Version-Release number of selected component (if applicable):
Host:
  kernel: 3.10.0-382.el7.x86_64
  qemu-kvm-rhev: qemu-kvm-rhev-2.5.0-4.el7.x86_64
  Reproducible with qemu-kvm-rhev-2.3.0-31.el7_2.12.x86_64
Guest:
  kernel: 3.10.0-382.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start a VM by using following command:
  ...
 -device virtio-scsi-pci,id=scsi_pci_bus0 \
 -drive file=/dev/sdb,format=qcow2,id=drive_sysdisk,if=none,cache=none,aio=native,werror=stop,rerror=stop \
 -device scsi-hd,drive=drive_sysdisk,bus=scsi_pci_bus0.0,id=device_sysdisk,bootindex=0 \
 -device virtio-scsi-pci,id=scsi_pci_bus1 \
 -drive file=/home/scsi_test1/datadisk1.qcow2,format=qcow2,id=drive_datadisk1,if=none,cache=none,werror=stop,rerror=stop \
 -device scsi-hd,drive=drive_datadisk1,bus=scsi_pci_bus1.0,id=device_datadisk1,wwn=0x345,serial=DATA_DISK_1 \
  ...
2.Check serial number in guest:
  lsblk --output NAME,SERIAL,WWN

Actual results:
# lsblk --output NAME,SERIAL,WWN
NAME                        SERIAL           WWN
sda                         drive_sysdisk    
├─sda1                                       
└─sda2                                       
  ├─rhel_dhcp--11--192-root                  
  └─rhel_dhcp--11--192-swap                  
sdb                         0000000000000345 0x0000000000000345

Expected results:
# lsblk --output NAME,SERIAL,WWN
NAME                        SERIAL           WWN
sda                         drive_sysdisk    
├─sda1                                       
└─sda2                                       
  ├─rhel_dhcp--11--192-root                  
  └─rhel_dhcp--11--192-swap                  
sdb                         DATA_DISK_1 0x0000000000000345

Additional info:

Comment 2 Fam Zheng 2016-06-27 08:32:06 UTC
Reassigning to udev.

lsblk calls libudev for disk information. The cause is in udev, ID_WWN overrides ID_SERIAL if present, even ID_SCSI_SERIAL is there:

# udevadm info -q all -n sdb
P: /devices/pci0000:00/0000:00:04.0/virtio1/host2/target2:0:1/2:0:1:0/block/sdb
N: sdb
S: disk/by-id/scsi-300000000000abcde
S: disk/by-id/wwn-0x00000000000abcde
S: disk/by-path/pci-0000:00:04.0-scsi-0:0:1:0
E: DEVLINKS=/dev/disk/by-id/scsi-300000000000abcde /dev/disk/by-id/wwn-0x00000000000abcde /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:1:0
E: DEVNAME=/dev/sdb
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/virtio1/host2/target2:0:1/2:0:1:0/block/sdb
E: DEVTYPE=disk
E: ID_BUS=scsi
E: ID_MODEL=QEMU_HARDDISK
E: ID_MODEL_ENC=QEMU\x20HARDDISK\x20\x20\x20
E: ID_PATH=pci-0000:00:04.0-scsi-0:0:1:0
E: ID_PATH_TAG=pci-0000_00_04_0-scsi-0_0_1_0
E: ID_REVISION=2.5+
E: ID_SCSI=1
E: ID_SCSI_SERIAL=sd0
E: ID_SERIAL=300000000000abcde
E: ID_SERIAL_SHORT=00000000000abcde
E: ID_TYPE=disk
E: ID_VENDOR=QEMU
E: ID_VENDOR_ENC=QEMU\x20\x20\x20\x20
E: ID_WWN=0x00000000000abcde
E: ID_WWN_WITH_EXTENSION=0x00000000000abcde
E: MAJOR=8
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=49056

Comment 3 Tony Hutter 2017-05-23 00:24:11 UTC
Any updates on this?  We're hitting this issue when calling lsblk from our ZFS scripts:
https://github.com/zfsonlinux/zfs/issues/6153

Comment 6 RHEL Program Management 2020-12-15 07:41:07 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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