scsi

Storage Reconfiguration

For example, the following command causes the kernel to forget about the LUN on busid 3, channel 0, target 7 and LUN 1:

echo "1" > \
/sys/class/scsi_host/host3/device/3:0:7:1/delete

The busid of 3 is redundant with the 3 in host3. This format also is used, however, in contexts where the busid is required, such as in /sys/bus/scsi/devices.

To later restore only that particular LUN, execute:

echo "0 7 1" > /sys/class/scsi_host/host3/scan

To resize this same LUN, use:

echo 1 > /sys/bus/scsi/devices/3:0:7:1/rescan

To scan all channels, targets and LUNs, try: