From: Gal Rosen <galr@storwize.com>
To: linux-scsi@vger.kernel.org
Subject: SCSI device rescan, detection of disconnected device, or switched devices.
Date: Mon, 28 Jul 2008 15:32:28 +0300 [thread overview]
Message-ID: <1217248348.4133.51.camel@galr-linux> (raw)
Hello all,
I know that when adding new device there is no problem;
by echo "- - -" >/sys/class/scsi_host/hostX/scan the SCSI subsystem will
recognize the new device and new /dev/sgX device will be created, but if
someone remove a device, scan will only recognize that the report luns
has changed, but it will not remove the /dev/sgX device.
If now someone add new device it will mapped to the /dev/sgX that
previously mapped to the device that just removed.
1. Why the SCSI subsystem doesn't release devices that removed ?
2. In the situation that I described above someone can switched devices
without notifying the application that use those devices. The
notification will come only when the next SCSI command will return with
unit attention saying "Power on, reset, or bus device reset occured", or
if device just removed without adding new device it will return
"Reported luns data has changed".
If I have an application that control SCSI devices using sg driver and I
would like to have the ability to change configuration online, what is
the preferred way to rescan the bus and update the application that sgX
that previously controls device Y is now controlling device Z ?
In other words, what is the best way for the application to identify
that device has been removed or changed ?
3. I am using Qlogic firmware ability to create virtual ports, and I
notice that on disconnect and then reconnect the FC cable, the sg
mapping can changed. If on module load the physical port got sg0, and on
creating vport it got sg1, now the SCSI subsystem scans the vport first
and mapped it to sg0 and the physical port gets sg1.
Is there a way to control the mapping (scanning) ?
Best regards,
Gal Rosen
Senior Software Engineer
www.storwize.com
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2008-07-28 12:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 12:32 Gal Rosen [this message]
2008-07-28 13:10 ` SCSI device rescan, detection of disconnected device, or switched devices Stefan Richter
2008-07-31 6:57 ` Gal Rosen
2008-07-31 8:34 ` Stefan Richter
2008-07-31 11:48 ` Gal Rosen
2008-07-31 14:15 ` James Bottomley
2008-07-31 15:59 ` Vladislav Bolkhovitin
2008-07-31 16:18 ` James Bottomley
2008-07-31 17:54 ` Vladislav Bolkhovitin
2008-07-31 16:09 ` Gal Rosen
2008-07-31 16:20 ` James Bottomley
[not found] ` <0C22B6EFEE0DBB4A9F9F3801E8790B3A732C0C@swdc2.storwiz.com>
2008-08-01 14:29 ` SCSI device rescan, detection of disconnected device,or " James Bottomley
2008-07-31 17:51 ` James.Smart
2008-07-31 17:46 ` SCSI device rescan, detection of disconnected device, or " James.Smart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217248348.4133.51.camel@galr-linux \
--to=galr@storwize.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox