Bug 846460

Summary: rescan-scsi-devices.sh is broken in RHEL7
Product: Red Hat Enterprise Linux 7 Reporter: Barry Donahue <bdonahue>
Component: sg3_utilsAssignee: Dan Horák <dhorak>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bdonahue, qcai
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-27 17:42:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Barry Donahue 2012-08-07 20:47:45 UTC
Description of problem:Our tests use rescan-scsi-devices.sh to discover newly provisioned lun. The same command that works on RHEL 5 and 6 does not work on RHEL 7.


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

kernel 3.3.0-0.20.el7.x86_64
sg3_utils-1.33-2.el7.x86_64.rpm
sg3_utils-libs-1.33-2.el7.x86_64.rpm

rescan-scsi-devices.sh -i work on qla2xxx but not on lpfc.

Comment 1 Dan Horák 2012-08-15 10:11:34 UTC
Hm, that's strange, what "-i" does is that it writes "1" to /sys/class/fc_host/host<num>/issue_lip and wait for udev to see the new devices. Does this file exist for the lpfc host? Anything interesting in kernel log?

Comment 2 Dan Horák 2012-08-15 10:19:01 UTC
from rescan-scsi-bus.sh version 1.56

    ....
    # We used to always trigger a rescan for FC to update channels and targets
    # Commented out -- as discussed with Hannes we should rely
    # on the main loop doing the scan, no need to do it here.
    #echo "- - -" > /sys/class/scsi_host/host$host/scan 2> /dev/null;
    #udevadm_settle

the explicit scan was present in rescan-scsi-bus.sh in RHEL 5 and 6, maybe the kernel drivers behave differently

Comment 4 Barry Donahue 2013-08-06 18:43:56 UTC
This still occurs on F19 and RHEL7. If you run rescan-scsi-bus with the -i option it will work. The problem is that that is not the default. The default behavior it to echo 1 > /sys/class/scsi_disk/<H:C:T:L>/device/rescan. These files don't exist yet for a newly added lun in RHEL7.

Comment 5 Dan Horák 2014-01-27 12:56:28 UTC
Barry, please retest with the sg3_utils from Beta, it contains newer version of the rescan-scsi-bus.sh script.

Comment 6 Barry Donahue 2014-01-27 17:23:28 UTC
It worked correctly on the 20140122.0 build.

Comment 7 Dan Horák 2014-01-27 17:42:53 UTC
sounds good, thanks, closing as CURRENTRELEASE