On Tue, 2016-09-13 at 22:08 +0530, Gurunath, Vasundhara wrote: > From: "Gurunath, Vasundhara" <vasundhara.gurunath@xxxxxxx> > > SCSI block device can be removed, using write to sysfs > delete file as below: > echo 1 > /sys/block/sdX/device/delete > If the device is in use by applications, or part of > system configuration such as boot device, removal can > result in application disruptions or system down time. > > An additional write option ? is added to SCSI sysfs > interface as below, in order to prevent accidental > deletion of devices in use. > echo ? > /sys/block/sdX/device/delete > > In the absence of any usage, this option proceeds with > device deletion. If the device is open, deletion is > prevented, and active Open and IO counts at the time of > deletion is logged. Information logged during latest > delete attempt can be obtained by issuing a read to the > delete file as below: > cat /sys/block/sdX/device/delete > This looks like debugging code added to find some culprit who deleted a device they weren't supposed to, and make it more difficult for them. I don't think we'd want this in normal usage. -Ewan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html