Bug 846460 - rescan-scsi-devices.sh is broken in RHEL7
rescan-scsi-devices.sh is broken in RHEL7
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sg3_utils (Show other bugs)
Unspecified Linux
high Severity high
: rc
: ---
Assigned To: Dan Horák
BaseOS QE - Apps
: Regression
Depends On:
  Show dependency treegraph
Reported: 2012-08-07 16:47 EDT by Barry Donahue
Modified: 2014-01-27 12:42 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-27 12:42:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Barry Donahue 2012-08-07 16:47:45 EDT
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

rescan-scsi-devices.sh -i work on qla2xxx but not on lpfc.
Comment 1 Dan Horák 2012-08-15 06:11:34 EDT
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 06:19:01 EDT
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;

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 14:43:56 EDT
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 07:56:28 EST
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 12:23:28 EST
It worked correctly on the 20140122.0 build.
Comment 7 Dan Horák 2014-01-27 12:42:53 EST
sounds good, thanks, closing as CURRENTRELEASE

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