Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Benjamin ESTRABAUD <be@mpstor.com>
To: linux-scsi@vger.kernel.org
Subject: qla2xxx: automatically rescan removed luns.
Date: Mon, 25 Nov 2013 15:37:24 +0000	[thread overview]
Message-ID: <52936EB4.4090508@mpstor.com> (raw)

Hi,

Using the qla2xxx driver from Linux 3.10.1 (release), if a LUN from the 
target side (multiple drives exported over a LIO IBlock qla2xxx export) 
is removed at the LIO level, the initiator side will not automatically 
detect that this LUN was removed.

All commands to this LUN will fail (sg_inq, read, writes) but the 
qla2xxx will never kick the drive out.

If another drive was to be exported on the target side using the same 
lun as the previously removed drive, commands sent to the same block id 
would now work again but be sent to the new LUN.

I tried to echo "- - -" in the scsi_host sysfs "scan" file corresponding 
to the FC port. This worked to detect new LUNs but not to "clear" 
removed ones.

I tried issuing a lip_reset on both sides, but no change.

Looking through Google, I realized that, on RedHat, a /proc/scsi/qla2xxx 
virtual FS exists which allows to send a "scsi-qlascan" command to the 
driver that apparently can detect removed LUNs. Unfortunately I don't 
have this FS visible on my Linux kernel, and I made sure /proc/scsi was 
enabled.

The only way I found was to "echo 1 > /sys/block/sdX/device/delete" to 
the stale device (that corresponds to the removed LUN from the target 
side), then replace the removed LUN on the target side before finally 
issuing a "scan" command on the initiator side.

Am I missing something here? Is there a way to rescan a Qlogic FC port 
using the "qla2xxx" driver from the official, stock kernel?

Thank you very much in advance for your help!

Regards,

Ben - MPSTOR

             reply	other threads:[~2013-11-25 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 15:37 Benjamin ESTRABAUD [this message]
2013-11-25 17:17 ` qla2xxx: automatically rescan removed luns Ewan Milne
2013-11-26 16:06   ` Benjamin ESTRABAUD
2013-11-26 16:26     ` Douglas Gilbert
2013-11-28 13:29       ` Hannes Reinecke
2013-12-03 17:35         ` Benjamin ESTRABAUD

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=52936EB4.4090508@mpstor.com \
    --to=be@mpstor.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