Re: removing a single device?

Patrick Mansfield (patmans@us.ibm.com)
Mon, 12 May 2003 14:09:59 -0700


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/