/~martin/ blog/ misc/ add remove scsi devices

removing and adding scsi-devices

To remove a scsi device with current (2.6.16) linux kernels use

echo 1 > /sys/class/scsi_host/hostH/device/targetH:B:T/H:B:T:L/delete

and to add them initiate a scan with

echo B T L > /sys/class/scsi_host/hostH/scan

Thanks to maks for the tips.