Hot-plugin scan/rescan scsi

What is h c t l
1
2
3
4
5
6
7
8
9
          h == hostadapter id (first one being 0)
c == SCSI channel on hostadapter (first one being 0)
t == ID (target)
l == LUN (first one being 0)

# lsscsi man page
Generic SCSI devices can also be accessed via the bsg driver in Linux. By default, the bsg driver's device node names are of the form
'/dev/bsg/H:C:T:L'. So, for example, the SCSI device shown by this utility on a line starting with the tuple '6:0:1:2' could be accessed
via the bsg driver with the '/dev/bsg/6:0:1:2' device node name.

Add the scsi device
1
2
echo "- - -" > /sys/class/scsi_host/host<h>/scan
echo "c t l" > /sys/class/scsi_host/host<h>/scan
Refresh the scsi device
1
2
echo 1 > /sys/block/sdau/device/rescan 
echo 1 > /sys/class/scsi_device/h:c:t:l/device/rescan
Remove the scsi device
1
2
echo 1 > /sys/class/scsi_device/h:c:t:l/device/delete
echo 1 > /sys/block/<dev>/device/delete

reference