public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Removing a disk from the qla2xxx driver.
@ 2005-04-20  5:05 Rajat  Jain, Noida
  2005-04-22  7:10 ` Andrew Vasquez
  0 siblings, 1 reply; 3+ messages in thread
From: Rajat  Jain, Noida @ 2005-04-20  5:05 UTC (permalink / raw)
  To: linux-scsi


Hi,

I do not know whether this is the corect forum to discuss this, but I
recently saw a post related to qla2xxx driver and thought that I may get
some help. I'm using Linux kernel 2.6 and plan to use the qla2xxx driver.

The driver documentstion says it has the "qlascan" command which can help in
adding new disks by the following procedure:

1) First add the Disk to the HBA.
2) # echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id> (The
qla2xxx driver will rescan)
3) # echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi (The mid-level
will add the device)

However, what I wanted to know was that how can I REMOVE a SCSI device from
the HBA at run time? By logic, I believe that the sequence should be:

1) # echo "scsi remove-single-device 0 1 2 3" >/proc/scsi/scsi (The
mid-level will remove the device)
2) Then remove the Disk from the HBA.
3) # echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id> (The
qla2xxx driver will rescan, and will remove the disk)

Is the above sequence (for deletion of disk) correct? Can somebody help me
out on this?

I would really appreciate. Any pointers on how to remove a disk at runtime
are welcome.

Thanks & Regards,

Rajat



Disclaimer: 

This message and any attachment(s) contained here are information that is
confidential,proprietary to HCL Technologies and its customers, privileged
or otherwise protected by law.The information is solely intended for the
individual or the entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read, forward,
print,retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing a disk from the qla2xxx driver.
  2005-04-20  5:05 Removing a disk from the qla2xxx driver Rajat  Jain, Noida
@ 2005-04-22  7:10 ` Andrew Vasquez
  2005-04-22  7:49   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Vasquez @ 2005-04-22  7:10 UTC (permalink / raw)
  To: Rajat  Jain, Noida; +Cc: linux-scsi

On Wed, 20 Apr 2005, Rajat  Jain, Noida wrote:

> 
> The driver documentstion says it has the "qlascan" command which can help in
> adding new disks by the following procedure:
> 
> 1) First add the Disk to the HBA.
> 2) # echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id> (The
> qla2xxx driver will rescan)

FYI:  these /proc interfaces are not present in the mainline
(upstream) qla2xxx driver.  Besides, typically these steps are only
needed if the topology isolates a LIP or SCN.  If the additional
device causes an RSCN (in the case of a fabric environment) to
propagate from the switch, the HBA will perform an SNS discovery and
login to the device.

Another alternative to forcing a LIP (and subsequently cause a
rescan), would be to initiate a bus-reset via sg_reset:

	# sg_reset -b /dev/sg0

The only downside is the /dev/sg0 device-node requirement.

> 3) # echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi (The mid-level
> will add the device)
> 

Yes, this will instruct the mid-layer to perform its own scan.

> However, what I wanted to know was that how can I REMOVE a SCSI device from
> the HBA at run time? By logic, I believe that the sequence should be:
> 
> 1) # echo "scsi remove-single-device 0 1 2 3" >/proc/scsi/scsi (The
> mid-level will remove the device)

This is the only step that is needed.

> 2) Then remove the Disk from the HBA.
> 3) # echo "scsi-qlascan" > /proc/scsi/<driver-name>/<adapter-id> (The
> qla2xxx driver will rescan, and will remove the disk)
> 

No, the HBA's recognition of the device persists throughout the
driver's lifetime -- this is not necessary.

Hope this helps.

Regards,
Andrew Vasquez

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing a disk from the qla2xxx driver.
  2005-04-22  7:10 ` Andrew Vasquez
@ 2005-04-22  7:49   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2005-04-22  7:49 UTC (permalink / raw)
  To: Rajat  Jain, Noida, linux-scsi

On Fri, Apr 22, 2005 at 12:10:54AM -0700, Andrew Vasquez wrote:
> Another alternative to forcing a LIP (and subsequently cause a
> rescan), would be to initiate a bus-reset via sg_reset:
> 
> 	# sg_reset -b /dev/sg0
> 
> The only downside is the /dev/sg0 device-node requirement.

This should work with the "normal" scsi devices nodes these days.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-22  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20  5:05 Removing a disk from the qla2xxx driver Rajat  Jain, Noida
2005-04-22  7:10 ` Andrew Vasquez
2005-04-22  7:49   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox