Bug 710159 - ib_srp scan/rescan keep adding new scsi devices
Summary: ib_srp scan/rescan keep adding new scsi devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: beta
: 6.2
Assignee: Doug Ledford
QA Contact: Infiniband QE
URL:
Whiteboard:
Depends On:
Blocks: 643467 659725 688933 735499
TreeView+ depends on / blocked
 
Reported: 2011-06-02 14:45 UTC by George Beshers
Modified: 2011-12-06 13:08 UTC (History)
7 users (show)

Fixed In Version: kernel-2.6.32-193.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 13:08:55 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1530 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux 6 kernel security, bug fix and enhancement update 2011-12-06 01:45:35 UTC

Description George Beshers 2011-06-02 14:45:53 UTC
Description of problem:
On a system w/RHEL 6 GA and accessing native IB storage arrays.
A scan/rescan keep adding new scsi devices after executing the
following command line

  # echo "- - -" > /sys/class/scsi_host/hostXX/scan

#uname -r
2.6.32-71.el6.x86_64

# modinfo ib_srp
filename:       /lib/modules/2.6.32-71.el6.x86_64/kernel/drivers/infiniband/ulp/srp/ib_srp.ko
license:        Dual BSD/GPL
description:    InfiniBand SCSI RDMA Protocol initiator v0.2 (November 1, 2005)
author:         Roland Dreier
srcversion:     9963F1B0823FC5B60CBF71C
depends:        ib_core,ib_cm,ib_sa,scsi_transport_srp
vermagic:       2.6.32-71.el6.x86_64 SMP mod_unload modversions 
parm:           srp_sg_tablesize:Max number of gather/scatter entries per I/O (default is 12, max 255) (int)
parm:           topspin_workarounds:Enable workarounds for Topspin/Cisco SRP target bugs if != 0 (int)
parm:           mellanox_workarounds:Enable workarounds for Mellanox SRP target bugs if != 0 (int)

Version-Release number of selected component (if applicable):
Unknown.

How reproducible:
Always.

Steps to Reproduce:
1. Login in to a system with connections to native IB storage
   array with four or more LUNs.

2. Load ib_srp kernel module

3. Start rdma service

4. For each HCA connection to the storage array execute the
   following command

     # opensm -g <hca_guid_hexValue> &

   For example,

     # opensm -g 0x0002c903000711c9 &
     # opensm -g 0x0002c903000711d5 &

5. For each /dev/infinband/umad<#> that's associated with a
   storage array connection, execute the following command

     # srp_daemon -c -a -o -e -d /dev/infiniband/umad<#> &

   For example,

    # srp_daemon -c -a -o -e -d /dev/infiniband/umad0 &
    # srp_daemon -c -a -o -e -d /dev/infiniband/umad1 &

6. Execute lsscsi.

7. Execute echo "- - -" > /sys/class/scsi_host/hostXX/scan,
   where XX is the host associated with native IB storage
   array devices.

   For example,

    # echo "- - -" > /sys/class/scsi_host/host17/scan
 
Actual results:
Caused additional SCSI targets to be created per SCSI host
(see example output below). 

[17:0:0:0]   disk    LSI      INF-01-00        8780  /dev/sdad
[17:0:0:1]   disk    LSI      INF-01-00        8780  /dev/sdag
[17:0:0:2]   disk    LSI      INF-01-00        8780  /dev/sdaj
[17:0:0:3]   disk    LSI      INF-01-00        8780  /dev/sdak
[17:0:0:31]  disk    LSI      Universal Xport  8780  /dev/sdal
[17:0:1:0]   disk    LSI      INF-01-00        8780  /dev/sdam
[17:0:1:1]   disk    LSI      INF-01-00        8780  /dev/sdan
[17:0:1:2]   disk    LSI      INF-01-00        8780  /dev/sdao
[17:0:1:3]   disk    LSI      INF-01-00        8780  /dev/sdap
[17:0:1:31]  disk    LSI      Universal Xport  8780  /dev/sdaq
[17:0:2:0]   disk    LSI      INF-01-00        8780  /dev/sdar
[17:0:2:1]   disk    LSI      INF-01-00        8780  /dev/sdas
[17:0:2:2]   disk    LSI      INF-01-00        8780  /dev/sdat
[17:0:2:3]   disk    LSI      INF-01-00        8780  /dev/sdau
[17:0:2:31]  disk    LSI      Universal Xport  8780  /dev/sdav
[17:0:3:0]   disk    LSI      INF-01-00        8780  /dev/sdaw
[17:0:3:1]   disk    LSI      INF-01-00        8780  /dev/sdax
[17:0:3:2]   disk    LSI      INF-01-00        8780  /dev/sday
[17:0:3:3]   disk    LSI      INF-01-00        8780  /dev/sdaz
[17:0:3:31]  disk    LSI      Universal Xport  8780  /dev/sdba
[17:0:4:0]   disk    LSI      INF-01-00        8780  /dev/sdbb
[17:0:4:1]   disk    LSI      INF-01-00        8780  /dev/sdbc
[17:0:4:2]   disk    LSI      INF-01-00        8780  /dev/sdbd
[17:0:4:3]   disk    LSI      INF-01-00        8780  /dev/sdbe
[17:0:4:31]  disk    LSI      Universal Xport  8780  /dev/sdbf
[17:0:5:0]   disk    LSI      INF-01-00        8780  /dev/sdbg
[17:0:5:1]   disk    LSI      INF-01-00        8780  /dev/sdbh
[17:0:5:2]   disk    LSI      INF-01-00        8780  /dev/sdbi
[17:0:5:3]   disk    LSI      INF-01-00        8780  /dev/sdbj
[17:0:5:31]  disk    LSI      Universal Xport  8780  /dev/sdbk
[17:0:6:0]   disk    LSI      INF-01-00        8780  /dev/sdbl
[17:0:6:1]   disk    LSI      INF-01-00        8780  /dev/sdbm
[17:0:6:2]   disk    LSI      INF-01-00        8780  /dev/sdbn
[17:0:6:3]   disk    LSI      INF-01-00        8780  /dev/sdbo
[17:0:6:31]  disk    LSI      Universal Xport  8780  /dev/sdbp
[17:0:7:0]   disk    LSI      INF-01-00        8780  /dev/sdbq
[17:0:7:1]   disk    LSI      INF-01-00        8780  /dev/sdbr
[17:0:7:2]   disk    LSI      INF-01-00        8780  /dev/sdbs
[17:0:7:3]   disk    LSI      INF-01-00        8780  /dev/sdbt
[17:0:7:31]  disk    LSI      Universal Xport  8780  /dev/sdbu

Expected results:
There shouldn't be additional SCSI targets created per
SCSI Host (see example output below).

[17:0:0:0]   disk    LSI      INF-01-00        8780  /dev/sdad
[17:0:0:1]   disk    LSI      INF-01-00        8780  /dev/sdag
[17:0:0:2]   disk    LSI      INF-01-00        8780  /dev/sdaj
[17:0:0:3]   disk    LSI      INF-01-00        8780  /dev/sdak
[17:0:0:31]  disk    LSI      Universal Xport  8780  /dev/sdal

Additional info:
This issue has been addressed in ofed 1.4.1. The following is an
excerpt from ofed srp relnotes.

  ====================================================================
  2. Changes and Bug Fixes since OFED 1.3.1
  ====================================================================
  * Check for scsi_id in scmnd to prevent scan/rescan keep adding new
  scsi devices

Workaround:
Use the following command line.

  # echo "0 0 -" > /sys/class/scsi_host/hostXX/scan

Comment 1 George Beshers 2011-06-02 14:46:31 UTC
Re-tested using Red Hat Enterprise Linux Server release 6.1 ga. The
problem still exists.

# uname -a
Linux pef3159.engr.sgi.com 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

--Sammy

Comment 3 Aristeu Rozanski 2011-08-31 14:24:17 UTC
Patch(es) available on kernel-2.6.32-193.el6

Comment 6 Larry Troan 2011-10-24 13:52:47 UTC
Adding Mellanox to the cc list of this public bug.

Comment 8 errata-xmlrpc 2011-12-06 13:08:55 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-2011-1530.html


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