On Tue, 2 Nov 2004, Benjamin Herrenschmidt wrote: > > There is a software-only (emulation) implementation of SCSI over USB > > available in the kernel. It provides both the host and peripheral disk > > drivers, and it's a great way to test code for hot-pluggable SCSI support. > > > > I'll post more details if anyone's interested. > > Ok. Actually, I do have a USB and a FireWire HD enclosures and spare > HDs, so that should be fine too. Thanks. Here you go... Under Device Drivers / USB support, configure usb-storage and go into the USB Gadget Support submenu. Select Dummy HCD as the USB Peripheral Controller and also select the File-Backed Storage Gadget. (It's not necessary to enable the "testing version" switch.) This will build (in addition to usb-storage) two modules: dummy_hcd and g_file_storage. The dummy_hcd driver provides an emulated USB bus; it acts as both a host controller and a peripheral device controller. g_file_storage is a peripheral disk driver; it uses a regular file or block device as backing storage (kind of like the loop driver). To use these things, first create a backing file to hold the data for your emulated drive. Then do: modprobe dummy_hcd modprobe g_file_storage file=$backing_filename That does the equivalent of plugging in a USB disk drive. When you then do modprobe usb-storage modprobe sd_mod (or if your hotplug scripts do it for you automatically) you will see a SCSI disk containing the data from your backing file. To simulate unplugging the drive, rmmod g_file_storage. Alan Stern