After playing around with: # echo "0 - -" > /sys/class/scsi_host/host1/scan (where host1 is owned by the scsi_debug driver), I have made some more changes to the driver (now version 1.72). These changes permit the number of scsi devices that the driver simulates to be increased via sysfs without necessarily adding new hosts. [add_host can still be used to add or remove hosts.] Here is an example: # modprobe scsi_debug # assume adds host 1 # echo 3 > /sys/bus/pseudo/drivers/scsi_debug/max_luns # echo 2 > /sys/bus/pseudo/drivers/scsi_debug/max_tgts # echo "0 - -" > /sys/class/scsi_host/host1/scan The modprobe line adds one scsi device and the echo "0 - -" line adds 5 more scsi devices to host 1. Retired the documentation in this page: http://www.torque.net/sg/sdebug25.html and replaced it with this reworked page: http://www.torque.net/sg/sdebug26.html Doug Gilbert Douglas Gilbert wrote: > This small patch adds a "release" method to the "pseudo_0" > device to stop the noise when the scsi_debug module is > loaded. > > Another annoyance that I was unable to get to the bottom > of was during "rmmod scsi_debug" **: > Synchronizing SCSI cache for disk sda: <4>FAILED > status = 0, message = 00, host = 1, driver = 00 > That is a DID_NO_CONNECT error. So the LLD host is > being shut down before the sd driver gets a chance to > send through a SYNCHRONIZE CACHE command. If the user > instigates a rmmod (as distinct from the hardware > saying the host/device is gone), shouldn't a window > be left open for such a flushing type command. This > problem seems to have appeared recently. > > > ** "echo -1 > add_host" in scsi_debug's driver directory > (i.e. remove a host) also causes the same error so the > problem is not perculiar to rmmod. > > Doug Gilbert New patch ...