USB Mass-storage Device Class - Device Access

Device Access

The USB mass storage specification does not require any particular file system to be used on conforming devices. Instead, it provides a simple interface to read and write sectors of data—much like the low-level interface used to access any hard drive—using the "SCSI transparent command set." Operating systems may treat the USB drive like a hard drive, and users may format it with any file system they like. Creating multiple partitions is also possible.

Because of its ubiquity and relative simplicity, the most common file system on embedded devices such as USB flash drives, cameras, or digital audio players is Microsoft's FAT or FAT32 file system with (optional) support for long names. Large USB-based hard disks may come formatted with NTFS, which is much less supported outside Microsoft Windows. However, a keydrive or any other device may be formatted using another filesystem (for example HFS Plus on an Apple Macintosh, or Ext2 under Linux, or Unix File System under Solaris or BSD). Of course, this choice may limit other operating systems' ability to access the contents of the device. Another storage options like LVM, partition tables and software encryption are also possible, depending on operating system.

In cameras, MP3 players, and similar gadgets which must access the file system independently from an external host, the FAT32 filesystem is typically preferred by device manufacturers. All such devices stop using the file system (unmount) before making it available to host operating system, to prevent file system corruption or other damages (theoretically it is possible to use it by both device and host, by using read-only mode or by using so called cluster-aware file system, however none of them are used in any of existing commodity devices, and have limited usage even in theory, especially on embedded devices). Some devices have also switch or option in menu, which allows using them in read-only mode (write protection). Often used to share files to multiple computers, without risk of virus infection from any of them.

There is variety of partitioning schemes used by preformatted devices. There are two main schemes used by vendors. First puts file system (most commonly FAT32) directly on the device without any partitions, effectively making it start from sector 0, without any additional boot sectors, headers or partitions. Second one, uses DOS partition table (and MBR code), with single (first) partition spanning entire device. This partition is often aligned to some high power of 2 of sectors (like 1 or 2MB), which is also common and important in solid state drives for best performance and durability. Some devices with embedded storage, acting like USB mass storage device (like MP3 players with USB port), will report that file system is damaged or missing, if formatted using different file system than FAT32 (or any other originally used there). However most devices which uses partition by default can be repartitioned (by shrinking size of first partition and file system) to have more partitions. Such devices will use first partition for its own operations, however after plugging into host system all partitions will be available.

There are also devices which are connected using single USB port, but act as multiple USB devices, one of which is a USB mass storage device. This is often used to simplify distribution and access to drivers and documentation, mostly for Microsoft Windows and Mac OS X operating system. Such drivers are necessary to make full use of the device (usually because the device does not fit any of the standard USB classes, or has additional functionality). An embedded USB mass storage device makes it possible to install additional drivers without the need for any CD-ROM disks, floppies or Internet access to vendor web site. This becomes more important as many modern systems are supplied without any optical or floppy drives. Often Internet access is not available, for example, because the device is used to provide network access - such as Wireless, GSM or Ethernet cards. The embedded USB mass storage is commonly made permanently read-only by the vendor, preventing accidental corruption and the use of it for other purposes (it can be sometimes updated using proprietary protocols when doing device's firmware upgrade). There are multiple other advantages of this way of distribution: decreased costs, simplified installation and fact that user cannot forget the drivers (a problem when using the device or selling the device).

Read more about this topic:  USB Mass-storage Device Class

Famous quotes containing the words device and/or access:

    Corporation. An ingenious device for obtaining individual profit without individual responsibility.
    Ambrose Bierce (1842–1914)

    In the greatest confusion there is still an open channel to the soul. It may be difficult to find because by midlife it is overgrown, and some of the wildest thickets that surround it grow out of what we describe as our education. But the channel is always there, and it is our business to keep it open, to have access to the deepest part of ourselves.
    Saul Bellow (b. 1915)