USB mass storage device class
From Wikipedia, the free encyclopedia
The USB mass storage device class is a set of computing communications protocols defined by the USB Implementers Forum that run on the Universal Serial Bus. The standard provides an interface to a variety of storage devices.
Some of the devices which are connected to computers via this standard are:
- external magnetic hard drives
- external optical drives, including CD and DVD reader and writer drives
- portable flash memory devices, particularly keydrives
- adapters bridging between standard flash memory cards and a USB connection
- digital cameras
- digital audio players (iPod, iAudio, Creative MuVo, Samsung Yepp series, SanDisk Sansa and other DAPs)
- high-end hardware media players
- Card Readers
- Portable Gaming systems (Nokia N-GAGE/Sony PSP)
- personal data assistants and handheld computers
- some newer mobile phones, such as the Sony Ericsson K800i, Nokia N73, Nokia E61
- USB Keystroke loggers
Devices (such as digital audio players) which support this standard are referred to as MSC (Mass Storage Class). MSC is the official acronym, while UMS (USB Mass Storage) has become common in some online forums. Not all digital audio players support this standard; some use MTP - another standard soon to emerge from the USB-IF, or proprietary protocols in lieu of MSC. (This information is not always revealed by the published device specifications.)
Contents |
[edit] Operating system support
As of 2004, most current main-stream operating systems include support for USB mass storage devices, although support on older systems is available through patches.
Microsoft's Windows 95 OSR2.1 operating system featured very limited support for USB in general, and no generic USB mass storage driver was produced by Microsoft for even Windows 98. This meant that a device-specific driver was needed for each type of USB storage device the installation encountered. This situation was (almost) remedied with the later Windows Me and Windows 2000 products (where a specific driver was required only for very unusual mass storage devices) and only fully corrected in the later Windows XP and Windows Server 2003 systems.
There is no native (supplied by Microsoft) support for USB in Windows NT, MS-DOS or earlier versions of Windows, although some third-party solutions exist for each OS. A third party generic mass storage driver for Windows 98 second edition is also now available. Another generic driver for W98 can be found here: Italian website Basically, it explains that when you insert a USB device and the windows 98 asks for drivers, you can select this driver: download driver
Apple Computer's Mac OS supports USB mass storage by means of optional drivers from OS 8.5.1, and OS 9 and OS X support USB mass storage natively.
Support in the Linux kernel began in kernel version 2.4, although 2.2 has been back-patched to support it.
Solaris supports UMASS storage devices as well since the 2.8 release and up.
NetBSD supports UMASS storage devices as well since the 1.5 release and up.
Windows Mobile supports most mass storage devices formatted with FAT on devices with USB Host, although devices powered by it typically cannot provide enough power on their own to run hard drives.
The game consoles Xbox 360 and PlayStation 3 support most mass storage devices.
[edit] File systems
The USB mass storage as such does not specify which file system shall be used on the device using it; instead, it mainly provides a way of reading out sectors as on any hard disk device, using the "SCSI transparent command set". Operating systems are free to format this storage area with any file system they like.
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, but a keydrive or any other device which is primarily intended for storage may be formatted using for example HFS Plus on an Apple Macintosh, or Ext2 under Linux, or Unix File System under Solaris Operating Environment.
On cameras, MP3 players and similar gadgets which access the file system on their own, FAT is typically preferred by the device manufacturers. Altering the file system in this case is generally a bad idea: the device will probably stop working.
Note that disk file systems were not devised with flash memory in mind. Flash-specific concerns like limited number of writes per cell can be affected by a write-heavy file system, causing flash memory manufacturers to reserve about 5 percent of each medium's capacity for wear leveling. On the other hand, disk concepts such as fragmentation or contiguity are not problems in flash because they impose no appreciable I/O delays, but they may lead to reduced performance in file systems that use extents.
[edit] Complications of the mass-storage device class
The mass storage interface is an attractive option for many devices, such as cameras and media players, which are nonetheless capable of more functionality than being simple data repositories. By presenting themselves as simple datastores, these devices can leverage the high degree of support for the USB mass-storage device class in current operating systems' USB driver stacks and allow easy read and write access to their internal memories. The downside of doing so is that it prevents the device from easily presenting its actual functional behavior across the USB interface too. For example, the makers of a digital still camera would also like it to implement the USB still-image device class, allowing it to be controlled by image capture software.
Some USB digital cameras feature a switch allowing them to appear either as a mass-storage device or as a still-picture device (PictBridge or PTP), but they cannot be both at the same time. It is likely that as development of USB controller chips advances, this constraint will cease to be an issue; for example, a camera could appear as a USB hub with both a mass-storage device and a still-picture device connected to it.
[edit] See also
- Disk encryption software
- PTP alternative transfer mode for digital cameras
[edit] External links
- Installing USB Mass Storage Devices on Windows 98 - Generic driver download for Windows 98SE to allow USB mass storage devices to work
- Jan Axelson's Usb Mass Storage article & book
- Mass Storage device class specification — on the site of the USB Implementers Forum.
- Bootability specification Mass Storage bootability specification — describes how bootable USB Mass Storage devices should work.
- "USB Mass Storage BOT" is a link that often rots, lately found buried at "USB" -> Developers -> Documents -> Class Specs -> Approved -> Mass Storage -> "Mass Storage Bulk Only 1.0".
- "Microsoft USB Storage FAQ"
- USB Mass Storage Device Source Code in Linux
- USB Mass Storage Host Source Code in Linux
- A 11k generic usb mass storage driver for windows 98 - article in italian
- USB Digital Camera HOWTO for Linux USB MSC