linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: removing a single device?
@ 2003-05-10  0:11 Douglas Gilbert
  2003-05-12 14:12 ` Robert L. Harris
  2003-07-02 19:39 ` Robert L. Harris
  0 siblings, 2 replies; 5+ messages in thread
From: Douglas Gilbert @ 2003-05-10  0:11 UTC (permalink / raw)
  To: linux-kernel, Robert.L.Harris

Robert L. Harris wrote:
 > A long time ago I used to be able to do:
 >
 > echo "scsi add-single-device 0 0 11 0" > /proc/scsi/scsi
 > echo "scsi remove-single-device 0 0 11 0" > /proc/scsi/scsi
 >
 > When I wanted to unplug a SCA scsi drive for replacement.  I tried this
 > recently on my 2.4.20 kernel and nothing happened.  No errors, no change
 > to /proc/scsi/scsi, no entry in dmsg, it just ignored it.  Has this been
 > deprecated for a new way of removing hotswap drives?

Robert,
It is not deprecated (and is still present in the lk 2.5
development series since we still have no other way of
doing this from the user space).

The parsing of that expression is very rigid: no tabs
or redundant spaces.

Doug Gilbert


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

* Re: removing a single device?
  2003-05-10  0:11 removing a single device? Douglas Gilbert
@ 2003-05-12 14:12 ` Robert L. Harris
  2003-05-12 21:09   ` Patrick Mansfield
  2003-07-02 19:39 ` Robert L. Harris
  1 sibling, 1 reply; 5+ messages in thread
From: Robert L. Harris @ 2003-05-12 14:12 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]



Does it work on scsi-emulation devices such as 3Ware raid controllers?

I'm trying to swap out a failed IDE drive on a 3Ware card.  I went into
tw_cli and executed "maint remove c1 p1" and it shows the drive offline.
The disk is in what appears to be a hot-swap connection similar to SCA.
Do I need to do the line below to remove it since the 3ware card
registers the drive offline?

root@legato-disk4.acs:~# tw_cli info c1 p1
Controller 1, Port  1
----------------------
Status:    OFFLINE JBOD
Model:     Maxtor 4G160J8
Size:      163.92 GB (320173056 blocks)
Serial #:  G805DE1E
FW:        GAK819K0
Unit:       1

/proc/scsi/scsi does still show the device:

Host: scsi1 Channel: 00 Id: 01 Lun: 00
  Vendor: 3ware    Model: 3w-xxxx          Rev: 1.0 
  Type:   Direct-Access                    ANSI SCSI revision: ffffffff

and the echo, remove below doesn't remove it.  It does happily though
work on some other systems with SCA interfaces.

Thanks,
  Robert




Thus spake Douglas Gilbert (dgilbert@interlog.com):

> Robert L. Harris wrote:
> > A long time ago I used to be able to do:
> >
> > echo "scsi add-single-device 0 0 11 0" > /proc/scsi/scsi
> > echo "scsi remove-single-device 0 0 11 0" > /proc/scsi/scsi
> >
> > When I wanted to unplug a SCA scsi drive for replacement.  I tried this
> > recently on my 2.4.20 kernel and nothing happened.  No errors, no change
> > to /proc/scsi/scsi, no entry in dmsg, it just ignored it.  Has this been
> > deprecated for a new way of removing hotswap drives?
> 
> Robert,
> It is not deprecated (and is still present in the lk 2.5
> development series since we still have no other way of
> doing this from the user space).
> 
> The parsing of that expression is very rigid: no tabs
> or redundant spaces.
> 
> Doug Gilbert

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: removing a single device?
  2003-05-12 14:12 ` Robert L. Harris
@ 2003-05-12 21:09   ` Patrick Mansfield
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Mansfield @ 2003-05-12 21:09 UTC (permalink / raw)
  To: Douglas Gilbert, linux-kernel

Robert -

On Mon, May 12, 2003 at 10:12:55AM -0400, Robert L. Harris wrote:

> /proc/scsi/scsi does still show the device:
> 
> Host: scsi1 Channel: 00 Id: 01 Lun: 00
>   Vendor: 3ware    Model: 3w-xxxx          Rev: 1.0 
>   Type:   Direct-Access                    ANSI SCSI revision: ffffffff
> 
> and the echo, remove below doesn't remove it.  It does happily though
> work on some other systems with SCA interfaces.

> > > echo "scsi add-single-device 0 0 11 0" > /proc/scsi/scsi
> > > echo "scsi remove-single-device 0 0 11 0" > /proc/scsi/scsi

If this is for the host/channel/id/lun as per your cat /proc/scsi/scsi,
you are specifying id (target) 11, where you should have used 1.

You can also check the result of the write to see if it worked, not sure
if it does anything on 2.4 when the device does not exist, on 2.5 trying to
remove a non-existent device gives me:

[root@elm3b79 root]# echo "scsi remove-single-device 1 2 3 4" > /proc/scsi/scsi
[root@elm3b79 root]# echo $?
1

-- Patrick Mansfield

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

* Re: removing a single device?
  2003-05-10  0:11 removing a single device? Douglas Gilbert
  2003-05-12 14:12 ` Robert L. Harris
@ 2003-07-02 19:39 ` Robert L. Harris
  1 sibling, 0 replies; 5+ messages in thread
From: Robert L. Harris @ 2003-07-02 19:39 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]



Just had it hit me again.

# cat /proc/scsi/scsi 
Attached devices: 
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
# echo "scsi remove-single-device 0 0 2 0" > /proc/scsi/scsi
# cat /proc/scsi/scsi 
Attached devices: 
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: SEAGATE  Model: ST318404LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03


  Kernel is 2.4.16.  Unfortunately I didn't build the kernel so I don't
know what options it was compiled with.  Is it possible the previous
admin left out a piece needed to enable this?

Thus spake Douglas Gilbert (dgilbert@interlog.com):

> Robert L. Harris wrote:
> > A long time ago I used to be able to do:
> >
> > echo "scsi add-single-device 0 0 11 0" > /proc/scsi/scsi
> > echo "scsi remove-single-device 0 0 11 0" > /proc/scsi/scsi
> >
> > When I wanted to unplug a SCA scsi drive for replacement.  I tried this
> > recently on my 2.4.20 kernel and nothing happened.  No errors, no change
> > to /proc/scsi/scsi, no entry in dmsg, it just ignored it.  Has this been
> > deprecated for a new way of removing hotswap drives?
> 
> Robert,
> It is not deprecated (and is still present in the lk 2.5
> development series since we still have no other way of
> doing this from the user space).
> 
> The parsing of that expression is very rigid: no tabs
> or redundant spaces.
> 
> Doug Gilbert

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* removing a single device?
@ 2003-05-09 19:58 Robert L. Harris
  0 siblings, 0 replies; 5+ messages in thread
From: Robert L. Harris @ 2003-05-09 19:58 UTC (permalink / raw)
  To: Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]



A long time ago I used to be able to do:

echo "scsi add-single-device 0 0 11 0" > /proc/scsi/scsi
echo "scsi remove-single-device 0 0 11 0" > /proc/scsi/scsi


When I wanted to unplug a SCA scsi drive for replacement.  I tried this
recently on my 2.4.20 kernel and nothing happened.  No errors, no change
to /proc/scsi/scsi, no entry in dmsg, it just ignored it.  Has this been
deprecated for a new way of removing hotswap drives?

Thanks,
  Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris                     | PGP Key ID: E344DA3B
                                         @ x-hkp://pgp.mit.edu 
DISCLAIMER:
      These are MY OPINIONS ALONE.  I speak for no-one else.

Diagnosis: witzelsucht  	

IPv6 = robert@ipv6.rdlg.net	http://ipv6.rdlg.net
IPv4 = robert@mail.rdlg.net	http://www.rdlg.net

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2003-07-02 19:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-10  0:11 removing a single device? Douglas Gilbert
2003-05-12 14:12 ` Robert L. Harris
2003-05-12 21:09   ` Patrick Mansfield
2003-07-02 19:39 ` Robert L. Harris
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09 19:58 Robert L. Harris

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).