Bug 842388 - storage pool cannot recognize multiple devices vis scsi host adapter
storage pool cannot recognize multiple devices vis scsi host adapter
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Osier Yang
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 12:50 EDT by Xiaowei Li
Modified: 2015-01-26 19:10 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-28 05:57:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xiaowei Li 2012-07-23 12:50:15 EDT
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 13:09:07 EDT
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 15:32:02 EDT
This BZ was apparently closed and reopened in error, so I'm removing the Reopened keyword.
Comment 3 Dave Allan 2012-07-23 15:35:08 EDT
(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-23 21:58:30 EDT
(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 12:17:17 EST
This bz is about libvirt, not virt-manager so I'm changing the component.
Comment 7 Xiaowei Li 2013-03-28 05:57:54 EDT
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.