Universal Serial Bus (USB) devices were developed by the personal computer industry to provide a method to attach peripheral devices such as keyboards, printers, cameras, and disk drives using a common connector and interface. Furthermore, USB devices are hot-pluggable, which means they can be connected or disconnected while the system is running. The operating system automatically detects when a USB device has been connected and automatically configures the operating environment to make it available.
The Solaris 9 operating environment supports USB devices on Sun Blade, Netra, and Sunfire systems. In addition, other Sun Ultra systems can be retrofitted with a USB interface to also support USB devices.
When hot-plugging a USB device, the device is immediately displayed in the device hierarchy. For example, a full device pathname for a USB Zip drive connected to an Ultra system would appear as follows:
/pci@1f,4000/usb@5/storage@1
A printer would look like this:
/pci@1f,4000/usb@5/hub@3/printer@1
Be careful when removing USB devices, however. If the device is being used when it is disconnected, you will get I/O errors and possible data errors. When this happens, you’ll need to plug the device back in, stop the application that is using the device, and then unplug the device.
As stated in Chapter 14, “Managing File Systems,” removable media such as floppy diskettes and CD-ROMs can be inserted and automatically mounted. When attaching a hot-pluggable device, it’s best to restart vold after attaching the USB device as follows:
pkill –HUP vold
After vold identifies that the device has been connected, you’ll see device names set up as follows:
zip1 -> /vol/dev/rdsk/c2t0d0/fat32 (USB Zip device) zip0 -> /vol/dev/rdsk/c1t0d0/zip100 (USB Zip device) jaz0 -> /vol/dev/rdsk/c3t0d0/jaz1gb (USB Jaz device)
When disconnecting a USB device such as a Zip drive, unmount the device, stop vold, disconnect the device, and then restart vold as follows:
For more information on vold, see Chapter 14.