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 831099 - add the ability to set a wwn for SCSI disks
Summary: add the ability to set a wwn for SCSI disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 831102
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-12 07:55 UTC by Paolo Bonzini
Modified: 2013-02-21 07:17 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.10.2-0rc1.el6
Doc Type: Enhancement
Doc Text:
Feature: Libvirt introduced new XML to set WWN for IDE and SCSI disk. Reason: WWNs provide stable device paths that are the same for IDE and SCSI disks. Result (if any): Besides a serial number, one can also set WWN for IDE and SCSI disk.
Clone Of:
: 831102 (view as bug list)
Environment:
Last Closed: 2013-02-21 07:17:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Paolo Bonzini 2012-06-12 07:55:22 UTC
Description of problem:
In addition to a serial number, upstream QEMU allows to set a disk's WWN.  The feature is enabled for IDE disks in 1.1, and will be added to SCSI disks as well in 1.2.  We would like to backport this to RHEL6, but we need libvirt support.

The <disk> element should grow a <wwn> sub-element whose contents must be composed of 16 hexadecimal digits.

Comment 1 Paolo Bonzini 2012-06-12 07:57:14 UTC
The WWN can be examined in the guest with "sudo sg_inq -p 0x83 /dev/sda", and should also be visible in /dev/disk/by-id.

For example with a <wwn>5000c50015ea71ad</wwn> element sg_vpd will show something like:

  Designation descriptor number 1, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0xc50
      Vendor Specific Identifier: 0x15ea71ad
      [0x5000c50015ea71ad]

Specifying a <serial> and <wwn> element together should also be tested.

Comment 7 Osier Yang 2012-08-30 04:43:00 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2012-August/msg01853.html

Comment 8 Osier Yang 2012-09-18 07:03:44 UTC
https://www.redhat.com/archives/libvir-list/2012-September/msg01220.html

Patches committed to upstream. Move to POST.

Comment 11 weizhang 2012-09-20 08:36:43 UTC
It depends on bug https://bugzilla.redhat.com/show_bug.cgi?id=831102
so we will wait for this qemu-kvm bug fixed.

Comment 12 weizhang 2012-11-26 06:38:08 UTC
Verify pass on
libvirt-0.10.2-9.el6.x86_64
qemu-kvm-0.12.1.2-2.334.el6.x86_64
kernel-2.6.32-329.el6.x86_64

Start guest with xml
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/scsi.img'/>
      <target dev='sda' bus='scsi'/>
      <serial>cdcdcd</serial>
      <wwn>5000c60016ea71ad</wwn>
    </disk>


Login to the guest and check
# sg_inq -p 0x83 /dev/sda 
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 10
    designator_type: vendor specific [0x0],  code_set: ASCII
    associated with the addressed logical unit
      vendor specific: cdcdcd
  Designation descriptor number 2, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0xc60
      Vendor Specific Identifier: 0x16ea71ad
      [0x5000c60016ea71ad]

So Verify pass

Comment 13 weizhang 2012-11-26 07:10:33 UTC
Also test with scsi-cd

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/images/tt.img'/>
      <target dev='sdc' bus='scsi'/>
      <readonly/>
      <serial>aababab</serial>
      <wwn>5001c60016ea71ad</wwn>
    </disk>

Login to the guest and check
# sg_inq -p 0x83 /dev/sr0 
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 11
    designator_type: vendor specific [0x0],  code_set: ASCII
    associated with the addressed logical unit
      vendor specific: aababab
  Designation descriptor number 2, descriptor length: 12
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 5, IEEE Company_id: 0x1c60
      Vendor Specific Identifier: 0x16ea71ad
      [0x5001c60016ea71ad]

so also verify pass for scsi-cd

Comment 14 errata-xmlrpc 2013-02-21 07:17: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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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