If remove a device on a target, the driver will normally not remove it automatically. To properly remove a device, perform the following steps:
Close all users of the device.
Unmount any file systems that mounted the device.
File systems that mounted the device should be unmounted using umount. In addition, you should also remove the device from any dm, md, LVM, multipath or RAID devices using it.
Remove the device from the SCSI layer using:
echo 1 > /sys/block/
<device name>/device/delete
As stated in the previous subsection, the proc interface is deprecated; as such, do not use it.