Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
When using rescan-scsi-bus.sh with the --forceremove option, expectation, taken from the --help of the command, is to "Remove and readd every device". Currently, the devices are removed, but we do not readd. Added additional line to ensure readd attempt.
Version-Release number of selected component (if applicable):
sg3_utils-libs-1.37-5.el7.x86_64
sg3_utils-1.37-5.el7.x86_64
How reproducible:
Run 'rescan-scsi-bus.sh --forceremove'
Observe devices are removed and not readded
Actual results:
Devices are removed
Expected results:
Devices should be removed and readded as mentioned in the help
Additional info:
Patch to enable readding:
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index fad4868..f2ae310 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -499,6 +499,7 @@ dolunscan()
fi
echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete
sleep 0.02
+ echo "scsi add-single-device $devnr" > /proc/scsi/scsi
else
echo "scsi remove-single-device $devnr" > /proc/scsi/scsi
if test $RC -eq 1 -o $lun -eq 0 ; then
As a note, I submitted the patch upstream on github but never got response.
https://github.com/hreinecke/sg3_utils/pull/5/commits/becd6d75acecc4e816e2e22f7cf649c24b9bd1ac
Hi John Pittman,
Upstream decideded to change help message instead of change action of
`forceremove`, and I would like to keep that way in RHEL 7.
Is that OK to you?
Help text of forceremove changed:
old: --forceremove: Remove and readd every device (DANGEROUS)
new: --forceremove: Remove stale devices (DANGEROUS)
Help text of forcerescan changed:
old: --forcerescan: Rescan existing devices
new: --forcerescan: Remove and readd existing devices (DANGEROUS)
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.
https://access.redhat.com/errata/RHBA-2017:2048
Description of problem: When using rescan-scsi-bus.sh with the --forceremove option, expectation, taken from the --help of the command, is to "Remove and readd every device". Currently, the devices are removed, but we do not readd. Added additional line to ensure readd attempt. Version-Release number of selected component (if applicable): sg3_utils-libs-1.37-5.el7.x86_64 sg3_utils-1.37-5.el7.x86_64 How reproducible: Run 'rescan-scsi-bus.sh --forceremove' Observe devices are removed and not readded Actual results: Devices are removed Expected results: Devices should be removed and readded as mentioned in the help Additional info: Patch to enable readding: diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh index fad4868..f2ae310 100755 --- a/scripts/rescan-scsi-bus.sh +++ b/scripts/rescan-scsi-bus.sh @@ -499,6 +499,7 @@ dolunscan() fi echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete sleep 0.02 + echo "scsi add-single-device $devnr" > /proc/scsi/scsi else echo "scsi remove-single-device $devnr" > /proc/scsi/scsi if test $RC -eq 1 -o $lun -eq 0 ; then As a note, I submitted the patch upstream on github but never got response. https://github.com/hreinecke/sg3_utils/pull/5/commits/becd6d75acecc4e816e2e22f7cf649c24b9bd1ac