diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml index 1c4b5df8ae..7d0ab41908 100644 --- a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml @@ -726,6 +726,138 @@ ar0: ATA RAID1 subdisks: ad4 ad6 status: REBUILDING 0% completed + + + + + Marc + Fonvieille + Contributed by + + + + + + USB Storage Devices + + USB + disks + + + A lot of external storage solutions, nowadays, use the + Universal Serial Bus (USB): hard drives, USB thumbdrives, CD-R + burners, etc. &os; provides support for these devices. + + + Configuration + + The USB mass storage devices driver, &man.umass.4;, + provides the support for USB storage devices. If you use the + GENERIC kernel, you do not have to change + anything in your configuration. If you use a custom kernel, + be sure that the following lines are present in your kernel + configuration file: + + device scbus +device da +device pass +device uhci +device ohci +device usb +device umass + + The &man.umass.4; driver uses the SCSI subsystem to access + to the USB storage devices, your USB device will be seen as a + SCSI device by the system. Depending on the USB chipset on + your motherboard, you only need one of both device + uhci and device ohci, however + having both in the kernel configuration file is harmless. Do + not forget to compile and install the new kernel if you added + any lines. + + + If your USB device is a CD-R burner, the SCSI CD-ROM + driver, &man.cd.4;, must be added to the kernel via the + line: + + device cd + + Since the burner is seen as a SCSI drive, the driver + &man.atapicam.4; should not be used in the kernel + configuration. + + + Support for USB 2.0 controllers is provided on + &os; 5.X and since &os; 4.10-RELEASE for the 4.X + branch. You have to add: + + device ehci + + to your configuration file for the USB 2.0 support. Note + &man.uhci.4; and &man.ohci.4; drivers are still needed if you + want USB 1.X support. + + + On &os; 4.X, the USB daemon (&man.usbd.8;) must be + running to be able to see some USB devices. To enable it, + add usbd_enable="YES" to your + /etc/rc.conf file and reboot the + machine. + + + + + Testing the Configuration + + The configuration is ready to be tested: plug in your USB + device, and in the system message buffer (&man.dmesg.8;), the + drive should appear as something like: + + umass0: USB Solid state disk, rev 1.10/1.00, addr 2 +GEOM: create disk da0 dp=0xc2d74850 +da0 at umass-sim0 bus 0 target 0 lun 0 +da0: <Generic Traveling Disk 1.11> Removable Direct Access SCSI-2 device +da0: 1.000MB/s transfers +da0: 126MB (258048 512 byte sectors: 64H 32S/T 126C) + + Of course, the brand, the device node + (da0) and other details can differ + according to your configuration. + + Since the USB device is seen as a SCSI one, the + camcontrol command can be used to list the + USB storage devices attached to the system: + + &prompt.root; camcontrol devlist +<Generic Traveling Disk 1.11> at scbus0 target 0 lun 0 (da0,pass0) + + If the drive comes with a file system, you should be able + to mount it. The will help you + to format and create partitions on the USB drive if + needed. + + If you unplug the device (the disk must be unmounted + before), you should see, in the system message buffer, + something like the following: + + umass0: at uhub0 port 1 (addr 2) disconnected +(da0:umass-sim0:0:0:0): lost device +(da0:umass-sim0:0:0:0): removing device entry +GEOM: destroy disk da0 dp=0xc2d74850 +umass0: detached + + + + Further Reading + + Beside the Adding + Disks and Mounting and + Unmounting File Systems sections, reading various + manual pages may be also useful: &man.umass.4;, + &man.camcontrol.8;, and &man.usbdevs.8;. + + +