Remove SCSI LUN with sg number of opens at 2?

Rigler, Stephen C. srigler at marathonoil.com
Wed Jul 13 14:56:06 UTC 2005


On Wed, 2005-07-13 at 10:51 -0400, Bruen, Mark wrote:
> I'm trying to remove a SCSI lun using:
> echo "scsi remove-single-device 1 0 1 100" > /proc/scsi/scsi
> It will not remove as seen in cat /proc/scsi/scsi:
> Host: scsi1 Channel: 00 Id: 01 Lun: 100
>   Vendor: 3PARdata Model: VV               Rev: 0000
>   Type:   Direct-Access                    ANSI SCSI revision: 03
> 
> cat /proc/scsi/sg/devices shows it has 2 opens:
> host   chan  id      lun     type   opens  qdepth  busy   online
> 1      0     1       100     0      2      30      0      1
> 
> Any way to find out what has it opened so it can be closed and removed
> without a reboot?
> 
> Thanks.
>     -Mark
> 

Look at "dmesg | tail" and /var/log/messages for some clues.  You may
not be able to remove the lun if something is still hanging on to it (ie
a mounted filesystem or active volume group).

-Steve




More information about the redhat-list mailing list