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 842388 - storage pool cannot recognize multiple devices vis scsi host adapter
Summary: storage pool cannot recognize multiple devices vis scsi host adapter
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-23 16:50 UTC by Xiaowei Li
Modified: 2015-01-27 00:10 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-28 09:57:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaowei Li 2012-07-23 16:50:15 UTC
Description of problem:
scsi_host5 is the FC HBA with 2 LUNs attached. each LUN has 4 paths.
after creating the storage pool via the 'SCSI Host Adapter' type, see 4 volumes 
in the pool. The 4 volume is the same lun.

It should list 2 mpath Luns.


Version-Release number of selected component (if applicable):
virsh # version
Compiled against library: libvir 0.9.11
Using library: libvir 0.9.11
Using API: QEMU 0.9.11
Running hypervisor: QEMU 1.0.0


How reproducible:


Steps to Reproduce:virsh # pool-list
Name                 State      Autostart 
-----------------------------------------
scsi_host5           active     yes       

virsh # pool-info scsi_host5
Name:           scsi_host5
UUID:           f02896fe-c689-00e1-f306-240097b6b528
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       64.00 GB
Allocation:     64.00 GB
Available:      0.00 

virsh # pool-dumpxml scsi_host5
<pool type='scsi'>
  <name>scsi_host5</name>
  <uuid>f02896fe-c689-00e1-f306-240097b6b528</uuid>
  <capacity unit='bytes'>68719476736</capacity>
  <allocation unit='bytes'>68719476736</allocation>
  <available unit='bytes'>0</available>
  <source>
    <adapter name='host5'/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
    <permissions>
      <mode>0700</mode>
      <owner>4294967295</owner>
      <group>4294967295</group>
    </permissions>
  </target>
</pool>
virsh # vol-list scsi_host5
Name                 Path                                    
-----------------------------------------
unit:0:0:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-2
unit:0:1:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-2
unit:0:2:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-2
unit:0:3:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-2

[root@storageqe-07 fc_host]# multipath -ll
mpathe (2001738015f9e0105) dm-0 IBM,2810XIV
size=16G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 5:0:1:1  sdf  8:80   active ready running
  |- 5:0:2:1  sdh  8:112  active ready running
  |- 4:0:0:1  sdi  8:128  active ready running
  |- 5:0:0:1  sdd  8:48   active ready running
  |- 5:0:3:1  sdl  8:176  active ready running
  |- 4:0:1:1  sdn  8:208  active ready running
  |- 4:0:2:1  sdp  8:240  active ready running
  `- 4:0:3:1  sdr  65:16  active ready running
mpathd (2001738015f9e0106) dm-1 IBM,2810XIV
size=16G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 5:0:0:2  sde  8:64   active ready running
  |- 5:0:1:2  sdg  8:96   active ready running
  |- 4:0:3:2  sds  65:32  active ready running
  |- 5:0:2:2  sdj  8:144  active ready running
  |- 4:0:0:2  sdk  8:160  active ready running
  |- 5:0:3:2  sdm  8:192  active ready running
  |- 4:0:1:2  sdo  8:224  active ready running
  `- 4:0:2:2  sdq  65:0   active ready running
  [root@storageqe-07 fc_host]# ls -l /dev/disk/by-path
total 0
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:0:0 -> ../../sda
lrwxrwxrwx. 1 root root 10 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:0:0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:0:0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:0:0-part3 -> ../../sda3
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:1:0 -> ../../sdb
lrwxrwxrwx. 1 root root 10 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:1:0-part1 -> ../../sdb1
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:2:0 -> ../../sdc
lrwxrwxrwx. 1 root root 10 Jul 23  2012 pci-0000:01:00.0-scsi-0:2:2:0-part1 -> ../../sdc1
lrwxrwxrwx. 1 root root  9 Jul 23 12:04 pci-0000:15:00.0-fc-0x500173815f9e0110-lun-1 -> ../../sdx
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.0-fc-0x500173815f9e0110-lun-2 -> ../../sdk
lrwxrwxrwx. 1 root root  9 Jul 23 12:04 pci-0000:15:00.0-fc-0x500173815f9e0111-lun-1 -> ../../sdy
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.0-fc-0x500173815f9e0111-lun-2 -> ../../sdo
lrwxrwxrwx. 1 root root 10 Jul 23 12:04 pci-0000:15:00.0-fc-0x500173815f9e0112-lun-1 -> ../../sdaa
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.0-fc-0x500173815f9e0112-lun-2 -> ../../sds
lrwxrwxrwx. 1 root root  9 Jul 23 12:04 pci-0000:15:00.0-fc-0x500173815f9e0113-lun-1 -> ../../sdz
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.0-fc-0x500173815f9e0113-lun-2 -> ../../sdq
lrwxrwxrwx. 1 root root  9 Jul 23 06:52 pci-0000:15:00.1-fc-0x500173815f9e0110-lun-1 -> ../../sdu
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.1-fc-0x500173815f9e0110-lun-2 -> ../../sde
lrwxrwxrwx. 1 root root  9 Jul 23 06:52 pci-0000:15:00.1-fc-0x500173815f9e0111-lun-1 -> ../../sdt
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.1-fc-0x500173815f9e0111-lun-2 -> ../../sdg
lrwxrwxrwx. 1 root root  9 Jul 23 06:52 pci-0000:15:00.1-fc-0x500173815f9e0112-lun-1 -> ../../sdw
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.1-fc-0x500173815f9e0112-lun-2 -> ../../sdm
lrwxrwxrwx. 1 root root  9 Jul 23 06:52 pci-0000:15:00.1-fc-0x500173815f9e0113-lun-1 -> ../../sdv
lrwxrwxrwx. 1 root root  9 Jul 23  2012 pci-0000:15:00.1-fc-0x500173815f9e0113-lun-2 -> ../../sdj


Actual results:


Expected results:


Additional info:

Comment 1 Xiaowei Li 2012-07-23 17:09:07 UTC
the expected result is that it should list 8 paths ( 2 LUns )

s/It should list 2 mpath Luns./ it should list 8 paths ( 2 luns )/

Comment 2 Dave Allan 2012-07-23 19:32:02 UTC
This BZ was apparently closed and reopened in error, so I'm removing the Reopened keyword.

Comment 3 Dave Allan 2012-07-23 19:35:08 UTC
(In reply to comment #1)
> the expected result is that it should list 8 paths ( 2 LUns )
> 
> s/It should list 2 mpath Luns./ it should list 8 paths ( 2 luns )/

This behavior is actually correct.  The SCSI pool type doesn't understand paths, it simply enumerates the block devices on an HBA.  You should use the multipath pool type to get the behavior you are looking for.

Comment 4 Xiaowei Li 2012-07-24 01:58:30 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > the expected result is that it should list 8 paths ( 2 LUns )
> > 
> > s/It should list 2 mpath Luns./ it should list 8 paths ( 2 luns )/
> 
> This behavior is actually correct.  The SCSI pool type doesn't understand
> paths, it simply enumerates the block devices on an HBA.  You should use the
> multipath pool type to get the behavior you are looking for.

Hi Dave,

Thanks for your quick response. I can understand why it not display the mpath and i know how to use the mpath device as the pool now.

There is another issue. There is 2 luns(8 path) attached to the HBA. after adding the HBA to the storage pool, i only see 1 lun(4 path). but after reboot, i can see 2 luns (8 path).

# virsh vol-list scsi_host5
Name                 Path                                    
-----------------------------------------
unit:0:0:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-2
unit:0:1:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-2
unit:0:2:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-2
unit:0:3:2           /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-2

# ls /dev/disk/by-path/pci-0000\:15\:00.1-fc-0x500173815f9e011*
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-1  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-1
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-2  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-2
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-1  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-1
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-2  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-2

# virsh pool-info scsi_host5
Name:           scsi_host5
UUID:           877c1223-fba1-cc2b-23ad-c418564cdc43
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       64.00 GB
Allocation:     64.00 GB
Available:      0.00 

>>>reboot the host>>>

# virsh vol-list scsi_host5
Name                 Path                                    
-----------------------------------------
unit:0:0:1           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0110-lun-1
unit:0:0:2           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0110-lun-2
unit:0:1:1           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0111-lun-1
unit:0:1:2           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0111-lun-2
unit:0:2:1           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0113-lun-1
unit:0:2:2           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0113-lun-2
unit:0:3:1           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0112-lun-1
unit:0:3:2           /dev/disk/by-path/pci-0000:15:00.0-fc-0x500173815f9e0112-lun-2

# ls /dev/disk/by-path/pci-0000\:15\:00.1-fc-0x500173815f9e011*
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-1  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-1
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0110-lun-2  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0112-lun-2
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-1  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-1
/dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0111-lun-2  /dev/disk/by-path/pci-0000:15:00.1-fc-0x500173815f9e0113-lun-2

Comment 6 Dave Allan 2012-11-21 17:17:17 UTC
This bz is about libvirt, not virt-manager so I'm changing the component.

Comment 7 Xiaowei Li 2013-03-28 09:57:54 UTC
cannot reproduce this issue on libvirt-1.0.2-1.el7.x86_64
maybe it's due to the time window. so close it.


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