Bug 427259 - add scsi scan rescan tool
add scsi scan rescan tool
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: sg3_utils (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
http://www.garloff.de/kurt/linux/resc...
: Reopened
: 469628 (view as bug list)
Depends On:
Blocks: 507379
  Show dependency treegraph
 
Reported: 2008-01-02 10:21 EST by Juha Tuomala
Modified: 2009-07-16 03:08 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-27 13:22:12 EST
Type: ---
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 Juha Tuomala 2008-01-02 10:21:28 EST
Description of problem:

Page:
 
  http://www.garloff.de/kurt/linux/

has scsi bus rescan script, similar that can already be
found from HP-UX and others. I think it should be added 
into sg3_utils or scsi-utils pakage as its own.

Now rescanning scsi bus in live system involves way too
much manual woodoo.

Expected results:

Easy to use system.
Comment 1 Juha Tuomala 2008-01-12 10:02:17 EST
ping? any comments?
Comment 2 Juha Tuomala 2008-07-09 11:14:30 EDT
Does the sg_scan do the same from sg3_utils pkg?

https://admin.fedoraproject.org/pkgdb/packages/name/sg3_utils

don't have my scsi stuff hooked atm so can't try myself.
Comment 3 Juha Tuomala 2008-07-09 11:15:17 EDT
Another related pkg is:

https://admin.fedoraproject.org/pkgdb/packages/name/scsi-target-utils

thou it seems to be bit more specific.
Comment 4 Petros Koutoupis 2008-07-25 10:27:06 EDT
The problem with a SCSI rescan tool is that there may be issues in scanning if 
you are attached to an RAID controller whereas the loop is handled somewhat 
differently from a traditional JBOD. Forcing the Linux SCSI Layer to pick up 
these disk devices (LUNs) mapped from the RAID controller will not reveal any 
new devices.

Another problem with an automatic scanning is if your LUN mappings change and 
you have some of the devices already mounted. Let us say SCSI Device <0 0 0 0> 
is assigned a major/minor by sd_mod and udev allocates /dev/sda to it. You 
format and mount /dev/sda to /mnt and use it.

If the LUN mapping changes where now the SCSI Device is mapped as <0 0 0 1> and 
you invoke a rescan, forgetting that the older mapping is still mounted under 
the previously assigned major/minor/sda identifiers the /mnt mounted path is 
now stuck and in some cases using an umount operation will have it get stuck in 
flushing all cached pages and post a lot of SCSI I/O errors 
in /var/log/messages.

In a logical case, you would know that the mapping changes but in some, such as 
in LSI mpt fusion drivers, by default they enable hot pluggable support and if 
a path goes down (unknowingly to you and may later come back up) it has been 
known to cause some severe damage.

The SCSI Layer on Linux 2.6 supports hot plugging, it is the Host Bus Adapters 
(HBAs) that usually do not, and I say for good reason.
Comment 5 Bug Zapper 2008-11-26 04:15:17 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Dan Horák 2008-11-27 09:48:37 EST

*** This bug has been marked as a duplicate of bug 469628 ***
Comment 7 Juha Tuomala 2008-11-27 11:46:51 EST
*** Bug 469628 has been marked as a duplicate of this bug. ***
Comment 8 Juha Tuomala 2008-11-27 11:49:43 EST
Dan, you didn't know that # is 427259 smaller than 469628 like is   date 2008-01-02 earlier to 2008-11-03?
Comment 9 Dan Horák 2008-11-27 13:22:12 EST
Sure I know what bug is older, but I also know what bug I have worked on and closed earlier.

The rescan script is already included in the sg3_utils package.
Comment 10 Juha Tuomala 2008-11-27 14:16:46 EST
> Sure I know what bug is older, but I also know what bug I have worked 
> on and closed earlier.

All right, Danny.
Comment 11 Juha Tuomala 2009-05-19 07:38:15 EDT
(In reply to comment #9)

> The rescan script is already included in the sg3_utils package.  


$ file $(rpm -q sg3_utils -l|grep bin)|grep -c -v ELF
0

Is it?
Comment 12 Juha Tuomala 2009-05-19 07:53:16 EDT
Group: Applications/System
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz
Source1: http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh-%{rescan_version}
URL: http://sg.danny.cz/sg/sg3_utils.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

It appears to be added into f10 branch but has not been built yet. Could you look this to the end as all it appears to need is rebuilding and testing?
Comment 14 Juha Tuomala 2009-05-19 09:35:31 EDT
/usr/bin/rescan-scsi-bus.sh

How about renaming it to /usr/sbin/scsi-rescan  ? Now it's not obvious name and that makes it harder to find with scsi<tab> command helping.
Comment 15 Fedora Update System 2009-06-23 06:03:15 EDT
sg3_utils-1.26-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/sg3_utils-1.26-2.fc10
Comment 16 Dan Horák 2009-06-23 06:08:22 EDT
(In reply to comment #14)
> /usr/bin/rescan-scsi-bus.sh
> 
> How about renaming it to /usr/sbin/scsi-rescan  ? Now it's not obvious name and
> that makes it harder to find with scsi<tab> command helping.  

I think I will keep the upstream name and create a symlink with more obvious name.
Comment 17 Juha Tuomala 2009-06-25 04:53:46 EDT
Did you already make the symlink? This entry is CLOSED and will be forgotten if you don't do it now. Also, imo the .sh extension is not needed.
Comment 18 Dan Horák 2009-06-25 05:12:41 EDT
(In reply to comment #17)
> Did you already make the symlink? This entry is CLOSED and will be forgotten if
> you don't do it now. Also, imo the .sh extension is not needed.  

The symlink is planned for next release. Could you open a new bug to track it? At least OpenSuSE distributes the script under its original name (rescan-scsi-bus.sh) and I will also use it as the primary name.
Comment 19 Juha Tuomala 2009-06-25 05:23:18 EDT
imo such tiny thing doesn't need own bug. put a post-it paper to your monitor frame for it :)

i requested the upstream to rename the whole beast.
Comment 20 Fedora Update System 2009-07-16 03:08:01 EDT
sg3_utils-1.26-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

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