linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to disconnect a SCSI device without crashing SLES8?
@ 2005-02-04 19:12 Eric Raskin
  2005-02-04 20:25 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Raskin @ 2005-02-04 19:12 UTC (permalink / raw)
  To: Linux-scsi

Hello all:

I apologize in advance if this is the wrong forum for this question.  Please
feel free to direct me to the correct newgroup.

I have a Dell 6650 running Suse Enterprise 8 (SLES8) with the 2.4.21-138-smp
kernel.  I have a Quantum M1500 tape library with 2 SDLT220 tape drives
connected to one of the internal Adaptec Controllers using the aic7xxxx
driver.  One of the tape drives has failed.  From experience, and from
Quantum tech support, I know that turning off the library while the system
is up will crash Linux.

In searching the web, I've found the "remove-scsi-device" and
"add-scsi-device" commands that can be sent to /proc/scsi/scsi.

Does anybody know if the system will stay up if I use these commands to
remove all my tape library devices before shutting it down?  Is this the
proper way to repair my library without having to shut the system off?

TIA

  Eric Raskin

PS.  Dell wants to charge me $199 to get an answer to speak with the
engineers who can answer this question.  It's easier to just turn off the
system! :-/

----------------------------------------------------------------------------
Eric H. Raskin                                          Voice: 914-765-0500
Professional Advertising Systems Inc.                   Fax:   914-765-0503
200 Business Park Dr Suite 107                          eraskin@paslists.com
Armonk, NY 10504




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

* Re: How to disconnect a SCSI device without crashing SLES8?
  2005-02-04 19:12 Eric Raskin
@ 2005-02-04 20:25 ` Christoph Hellwig
  2005-02-04 20:36   ` Eric Raskin
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2005-02-04 20:25 UTC (permalink / raw)
  To: Eric Raskin; +Cc: Linux-scsi

On Fri, Feb 04, 2005 at 02:12:13PM -0500, Eric Raskin wrote:
> In searching the web, I've found the "remove-scsi-device" and
> "add-scsi-device" commands that can be sent to /proc/scsi/scsi.
> 
> Does anybody know if the system will stay up if I use these commands to
> remove all my tape library devices before shutting it down?  Is this the
> proper way to repair my library without having to shut the system off?

remove-scsi-device could work, but in Linux 2.4 it's racy.

If you want to remove and add devices at runtime safely you'll have to
update to Linux 2.6.


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

* RE: How to disconnect a SCSI device without crashing SLES8?
  2005-02-04 20:25 ` Christoph Hellwig
@ 2005-02-04 20:36   ` Eric Raskin
  2005-02-04 21:06     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Raskin @ 2005-02-04 20:36 UTC (permalink / raw)
  To: Linux-scsi

Thanks, Christoph.  Would we use the same commands on 2.6?

----------------------------------------------------------------------------
Eric H. Raskin                                          Voice: 914-765-0500
Professional Advertising Systems Inc.                   Fax:   914-765-0503
200 Business Park Dr Suite 107                          eraskin@paslists.com
Armonk, NY 10504


-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org] 
Sent: Friday, February 04, 2005 3:25 PM
To: Eric Raskin
Cc: Linux-scsi@vger.kernel.org
Subject: Re: How to disconnect a SCSI device without crashing SLES8?

On Fri, Feb 04, 2005 at 02:12:13PM -0500, Eric Raskin wrote:
> In searching the web, I've found the "remove-scsi-device" and
> "add-scsi-device" commands that can be sent to /proc/scsi/scsi.
> 
> Does anybody know if the system will stay up if I use these commands to
> remove all my tape library devices before shutting it down?  Is this the
> proper way to repair my library without having to shut the system off?

remove-scsi-device could work, but in Linux 2.4 it's racy.

If you want to remove and add devices at runtime safely you'll have to
update to Linux 2.6.



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

* RE: How to disconnect a SCSI device without crashing SLES8?
@ 2005-02-04 20:56 Rajat  Jain, Noida
  2005-02-04 21:26 ` Eric Raskin
  2005-02-04 21:51 ` Mike Anderson
  0 siblings, 2 replies; 7+ messages in thread
From: Rajat  Jain, Noida @ 2005-02-04 20:56 UTC (permalink / raw)
  To: eraskin, Linux-scsi



Linux 2.6 ????? Uhh .... I thought you did not wanted to REBOOT the
system???? 


The command syntax is same. Devices can be removed using the following
command:

echo "scsi remove-single-device <h> <b> <t> <l>" > /proc/scsi/scsi

where the variables are host, bus (channel), target (scsi id) and lun. 

But the removal will fail if the device is busy (e.g. if a file system on
the device is mounted). 


Rajat Jain 
HCL Technologies, 
A-11, Sector 16, Noida-201301. 
Ph: +91-120-2510701/702/813 Extn.3019 
rajatj@noida.hcltech.com 
http://www.hcltech.com/
	"...one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of their C
programs."
	Robert Firth 




-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Eric Raskin
Sent: Saturday, February 05, 2005 2:07 AM
To: Linux-scsi@vger.kernel.org
Subject: RE: How to disconnect a SCSI device without crashing SLES8?

Thanks, Christoph.  Would we use the same commands on 2.6?

----------------------------------------------------------------------------
Eric H. Raskin                                          Voice: 914-765-0500
Professional Advertising Systems Inc.                   Fax:   914-765-0503
200 Business Park Dr Suite 107                          eraskin@paslists.com
Armonk, NY 10504


-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Friday, February 04, 2005 3:25 PM
To: Eric Raskin
Cc: Linux-scsi@vger.kernel.org
Subject: Re: How to disconnect a SCSI device without crashing SLES8?

On Fri, Feb 04, 2005 at 02:12:13PM -0500, Eric Raskin wrote:
> In searching the web, I've found the "remove-scsi-device" and 
> "add-scsi-device" commands that can be sent to /proc/scsi/scsi.
> 
> Does anybody know if the system will stay up if I use these commands 
> to remove all my tape library devices before shutting it down?  Is 
> this the proper way to repair my library without having to shut the system
off?

remove-scsi-device could work, but in Linux 2.4 it's racy.

If you want to remove and add devices at runtime safely you'll have to
update to Linux 2.6.


-
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

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

* Re: How to disconnect a SCSI device without crashing SLES8?
  2005-02-04 20:36   ` Eric Raskin
@ 2005-02-04 21:06     ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2005-02-04 21:06 UTC (permalink / raw)
  To: Eric Raskin; +Cc: Linux-scsi

On Fri, Feb 04, 2005 at 03:36:48PM -0500, Eric Raskin wrote:
> Thanks, Christoph.  Would we use the same commands on 2.6?

They still work if CONFIG_SCSI_PROC_FS is enabled.  Always available
and easier to use is to do echo "1" > /sys/device/N:N:N:N/device/delete
where N:N:N:N is bus, channel, target, lun of the device to be deleted.


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

* RE: How to disconnect a SCSI device without crashing SLES8?
  2005-02-04 20:56 How to disconnect a SCSI device without crashing SLES8? Rajat  Jain, Noida
@ 2005-02-04 21:26 ` Eric Raskin
  2005-02-04 21:51 ` Mike Anderson
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Raskin @ 2005-02-04 21:26 UTC (permalink / raw)
  To: Linux-scsi

Yes, that's true.  I went ahead and used the commands on 2.4.  They worked
just fine this time. :-)

The question about 2.6 was just for my own education -- for when I actually
get around to installing SLES9 on my production server.

Thanks to everyone for their help.

----------------------------------------------------------------------------
Eric H. Raskin                                          Voice: 914-765-0500
Professional Advertising Systems Inc.                   Fax:   914-765-0503
200 Business Park Dr Suite 107                          eraskin@paslists.com
Armonk, NY 10504


-----Original Message-----
From: Rajat Jain, Noida [mailto:rajatj@noida.hcltech.com] 
Sent: Friday, February 04, 2005 3:57 PM
To: eraskin@paslists.com; Linux-scsi@vger.kernel.org
Subject: RE: How to disconnect a SCSI device without crashing SLES8?



Linux 2.6 ????? Uhh .... I thought you did not wanted to REBOOT the
system???? 


The command syntax is same. Devices can be removed using the following
command:

echo "scsi remove-single-device <h> <b> <t> <l>" > /proc/scsi/scsi

where the variables are host, bus (channel), target (scsi id) and lun. 

But the removal will fail if the device is busy (e.g. if a file system on
the device is mounted). 


Rajat Jain 
HCL Technologies, 
A-11, Sector 16, Noida-201301. 
Ph: +91-120-2510701/702/813 Extn.3019 
rajatj@noida.hcltech.com 
http://www.hcltech.com/
	"...one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of their C
programs."
	Robert Firth 




-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Eric Raskin
Sent: Saturday, February 05, 2005 2:07 AM
To: Linux-scsi@vger.kernel.org
Subject: RE: How to disconnect a SCSI device without crashing SLES8?

Thanks, Christoph.  Would we use the same commands on 2.6?

----------------------------------------------------------------------------
Eric H. Raskin                                          Voice: 914-765-0500
Professional Advertising Systems Inc.                   Fax:   914-765-0503
200 Business Park Dr Suite 107                          eraskin@paslists.com
Armonk, NY 10504


-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Friday, February 04, 2005 3:25 PM
To: Eric Raskin
Cc: Linux-scsi@vger.kernel.org
Subject: Re: How to disconnect a SCSI device without crashing SLES8?

On Fri, Feb 04, 2005 at 02:12:13PM -0500, Eric Raskin wrote:
> In searching the web, I've found the "remove-scsi-device" and 
> "add-scsi-device" commands that can be sent to /proc/scsi/scsi.
> 
> Does anybody know if the system will stay up if I use these commands 
> to remove all my tape library devices before shutting it down?  Is 
> this the proper way to repair my library without having to shut the system
off?

remove-scsi-device could work, but in Linux 2.4 it's racy.

If you want to remove and add devices at runtime safely you'll have to
update to Linux 2.6.


-
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



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

* Re: How to disconnect a SCSI device without crashing SLES8?
  2005-02-04 20:56 How to disconnect a SCSI device without crashing SLES8? Rajat  Jain, Noida
  2005-02-04 21:26 ` Eric Raskin
@ 2005-02-04 21:51 ` Mike Anderson
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Anderson @ 2005-02-04 21:51 UTC (permalink / raw)
  To: Rajat  Jain, Noida; +Cc: eraskin, Linux-scsi

Rajat  Jain, Noida [rajatj@noida.hcltech.com] wrote:
> Linux 2.6 ????? Uhh .... I thought you did not wanted to REBOOT the
> system???? 
> 
> 
> The command syntax is same. Devices can be removed using the following
> command:
> 
> echo "scsi remove-single-device <h> <b> <t> <l>" > /proc/scsi/scsi
> 
> where the variables are host, bus (channel), target (scsi id) and lun. 
> 

on 2.6 you can use the sysfs attributes to add and delete devices. echo
"1" > scsi/devices/1:0:0:0/delete to delete a device. echo "- - -" >
class/scsi_host/host0/scan to scan a host. You can alter the "-" wild
cards if you want to scan a smaller set of targets / luns . Also using
this scan method allows a report luns command to be sent out.

-andmike
--
Michael Anderson
andmike@us.ibm.com


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

end of thread, other threads:[~2005-02-04 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 20:56 How to disconnect a SCSI device without crashing SLES8? Rajat  Jain, Noida
2005-02-04 21:26 ` Eric Raskin
2005-02-04 21:51 ` Mike Anderson
  -- strict thread matches above, loose matches on Subject: below --
2005-02-04 19:12 Eric Raskin
2005-02-04 20:25 ` Christoph Hellwig
2005-02-04 20:36   ` Eric Raskin
2005-02-04 21:06     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).