USB Storage Devices in the Labs
USB storage devices - popularly known as USB keys, thumb drives and memory sticks - can be used on any lab workstation that has a USB port on the front of the case or on Apple workstations where the USB ports are easy to reach.How it works
The basic command, after plugging the key into the USB port, is priv usb mount. As with priv cdrom this command is only available while logged in to the console of a computer and only works for USB devices attached to that computer. The command puts the contents of the USB device inside the directory /mnt/usb/N where N is usually 1. You change files in that directory to change the files on the USB device.When you finish you must unmount the device before disconnecting it. Do this by running the command priv usb umount. This tells the computer to stop changing files on the device and properly save all of the changes made.
What storage devices can I use?
Most USB devices should work. Our computers are configured to work with almost all devices for which Linux kernel support has been written.However, the device must be formatted with FAT, VFAT or HFS+ before you can use it on CSE computers. Our computers do not support NTFS, Ext2 or Ext3 formats, or other filesystem formats. Linux does not have read/write drivers for NTFS or for other filesystems. The ext formats have permission issues, so they are not mountable either.
Using the priv usb command
There are four options:- priv usb list - list all supported devices that are currently available. Each device will have a number (0, 1, ...), an indication of whether it is currently mounted, and some vendor-specific information.
- priv usb mount [N] - mount the key at /mnt/usb/N where N is the number of the device. If only one device is available (i.e. only one USB port) it will be mounted, otherwise you will need to give the number of the device to mount. e.g. priv usb mount 2.
- priv usb umount [N] - unmount all USB keys that are present and mounted. If a device number is given, just that device will be unmounted.
- priv usb clean - unmount all keys that are mounted but not present, an indication that the devices are in a confused state. This command is run automatically when any USB storage device is removed so it should not be necessary to run it by hand; it is included here for completeness.
Once you have plugged and mounted a USB storage device you can access all the data on it simply by accessing the files under /mnt/usb/N