This article needs additional citations for verification .(November 2022) |
The USB mass storage device class (also known as USB MSC or UMS) is a set of computing communications protocols, specifically a USB Device Class, defined by the USB Implementers Forum that makes a USB device accessible to a host computing device and enables file transfers between the host and the USB device. To a host, the USB device acts as an external hard drive; the protocol set interfaces with a number of storage devices.
Devices connected to computers via this standard include:
Devices supporting this standard are known as MSC (Mass Storage Class) devices. While MSC is the original abbreviation, UMS (Universal Mass Storage) has also come into common use.
Most mainstream operating systems include support for USB mass storage devices; support on older systems is usually available through patches.
Microsoft Windows has supported MSC since Windows 2000. There is no support for USB supplied by Microsoft in Windows before Windows 95 and Windows NT 4.0. Windows 95 OSR2.1, an update to the operating system, featured limited support for USB. During that time no generic USB mass-storage driver was produced by Microsoft (including for Windows 98), and a device-specific driver was needed for each type of USB storage device. Third-party, freeware drivers became available for Windows 98 and Windows 98SE, and third-party drivers are also available for Windows NT 4.0. Windows 2000 has support (via a generic driver) for standard USB mass-storage devices; Windows Me and all later Windows versions also include support.
Windows Mobile supports accessing most USB mass-storage devices formatted with FAT on devices with USB Host. However, portable devices typically cannot provide enough power for hard-drive disk enclosures (a 2.5-inch (64 mm) hard drive typically requires the maximum 2.5 W in the USB specification) without a self-powered USB hub. A Windows Mobile device cannot display its file system as a mass-storage device unless the device implementer adds that functionality. However, third-party applications add MSC emulation to most WM devices (commercial Softick CardExport and free WM5torage). Only memory cards (not internal-storage memory) can generally be exported, due to file-systems issues; see device access, below.
The AutoRun feature of Windows worked on all removable media, allowing USB storage devices to become a portal for computer viruses. Beginning with Windows 7, Microsoft limited AutoRun to CD and DVD drives, updating previous Windows versions. [1]
Neither MS-DOS nor most compatible operating systems included support for USB. Third-party generic drivers, such as Duse, USBASPI and DOSUSB, are available to support USB mass-storage devices. FreeDOS supports USB mass storage as an Advanced SCSI Programming Interface (ASPI) interface.
Apple's Mac OS 9 and macOS support USB mass storage; Mac OS 8.6 supported USB mass storage through an optional driver. [2]
The Linux kernel has supported USB mass-storage devices since version 2.3.47 [3] (2001, backported to kernel 2.2.18 [4] ). This support includes quirks and silicon/firmware bug workarounds as well as additional functionality for devices and controllers (vendor-enabled functions such as ATA command pass-through for ATA-USB bridges, used for S.M.A.R.T. or temperature monitoring, controlling the spin-up and spin-down of hard disk drives, and other options). Mobile devices running Android 6 or higher [5] also support USB mass storage through dual-role USB on USB-C ports, and USB-OTG on older ports.
Solaris has supported devices since its version 2.8 (1998), NetBSD since its version 1.5 (2000), FreeBSD since its version 4.0 (2000) and OpenBSD since its version 2.7 (2000). Digital UNIX (later known as Tru64 UNIX), has supported USB and USB mass-storage devices since its version 4.0E (1998). AIX has supported USB mass-storage devices since its 5.3 T9 and 6.1 T3 versions; however, it is not well-supported and lacks features such as partitioning and general blocking. [6]
The Xbox 360 and PlayStation 3 support most mass-storage devices for the data transfer of media such as pictures and music. As of April 2010, the Xbox 360 (a) used a mass-storage device for saved games [7] and the PS3 allowed transfers between devices on a mass-storage device. Independent developers have released drivers for the TI-84 Plus and TI-84 Plus Silver Edition to access USB mass-storage devices. [8] In these calculators, the usb8x driver supports the msd8x user-interface application.
This section is missing information about Bulk-Only Transport: we keep linking to this article to contrast with UAS but there's no description here!.(May 2023) |
The USB mass-storage specification provides an interface to a number of industry-standard command sets, allowing a device to disclose its subclass. In practice, there is little support for specifying a command set via its subclass; most drivers only support the SCSI transparent command set, designating their subset of the SCSI command set with their SCSI Peripheral Device Type (PDT). Subclass codes specify the following command sets:
The specification does not require a particular file system on conforming devices. Based on the specified command set and any subset, it provides a means to read and write sectors of data (similar to the low-level interface used to access a hard drive). Operating systems may treat a USB mass-storage device like a hard drive; users may partition it in any format (such as MBR and GPT), and format it with any file system.
Because of its 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 filenames). However, USB mass storage devices may be formatted with any other file system, such as NTFS on Windows NT, HFS Plus on macOS, ext2 on Linux, or Unix File System on Solaris or BSD. This choice may limit (or prevent) access to a device's contents by equipment using a different operating system. OS-dependent storage options include LVM, partition tables and software encryption.
In cameras, MP3 players and similar devices which must access a file system independent of an external host, the FAT32 file system is preferred by manufacturers. All such devices halt their file-system (dismount) before making it available to a host operating system to prevent file-system corruption or other damage (although it is theoretically possible for both devices to use read-only mode or a cluster file system). Some devices have a write-protection switch (or option) allowing them to be used in read-only mode.
Two main partitioning schemes are used by vendors of pre-formatted devices. One puts the file system (usually FAT32) directly on the device without partitioning, making it start from sector 0 without additional boot sectors, headers or partitions. The other uses a DOS partition table (and MBR code), with one partition spanning the entire device. This partition is often aligned to a high power of two of the sectors (such as 1 or 2 MB), common in solid state drives for performance and durability. Some devices with embedded storage resembling a USB mass-storage device (such as MP3 players with a USB port) will report a damaged (or missing) file system if they are reformatted with a different file system. However, most default-partition devices may be repartitioned (by reducing the first partition and file system) with additional partitions. Such devices will use the first partition for their own operations; after connecting to the host system, all partitions are available.
Devices connected by a single USB port may function as multiple USB devices, one of which is a USB mass-storage device. This simplifies distribution and access to drivers and documentation, primarily for the Microsoft Windows and Mac OS X operating systems. Such drivers are required to make full use of the device, usually because it does not fit a standard USB class or has additional functionality. An embedded USB mass-storage device makes it possible to install additional drivers without CD-ROM disks, floppies or Internet access to a vendor website; this is important, since many modern systems are supplied without optical or floppy drives. Internet access may be unavailable because the device provides network access (wireless, GSM or Ethernet cards). The embedded USB mass storage is usually made permanently read-only by the vendor, preventing accidental corruption and use for other purposes (although it may be updated with proprietary protocols when performing a firmware upgrade). Advantages of this method of distribution are lower cost, simplified installation and ensuring driver portability.
Some advanced hard disk drive commands, such as Tagged Command Queuing and Native Command Queuing (which may increase performance), ATA Secure Erase (which allows all data on the drive to be securely erased) and S.M.A.R.T. (accessing indicators of drive reliability) exist as extensions to low-level drive command sets such as SCSI, ATA and ATAPI. These features may not work when the drives are placed in a disk enclosure that supports a USB mass-storage interface. Some USB mass-storage interfaces are generic, providing basic read-write commands; although that works well for basic data transfers with devices containing hard drives, there is no simple way to send advanced, device-specific commands to such USB mass-storage devices (though, devices may create their own communication protocols over a standard USB control interface). The USB Attached SCSI (UAS) protocol, introduced in USB 3.0, fixes several of these issues, including command queuing, command pipes for hardware requiring them, and power management.
Specific USB 2.0 chipsets had proprietary methods of achieving SCSI pass-through, which could be used to read S.M.A.R.T. data from drives using tools such as smartctl (using the -d option followed by "chipset"). [9] More recent USB storage chipsets support the SCSI / ATA Translation (SAT) as a generic protocol for interacting with ATA (and SATA) devices. [10] Using esoteric ATA or SCSI pass-through commands (such as secure-erase or password protection) when a drive is connected via a USB bridge may cause drive failure, especially with the hdparm utility. [11]
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details about the hardware being used.
Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices, best known for its use with storage devices such as hard disk drives. SCSI was introduced in the 1980s and has seen widespread use on servers and high-end workstations, with new SCSI standards being published as recently as SAS-4 in 2017.
Internet Small Computer Systems Interface or iSCSI is an Internet Protocol-based storage networking standard for linking data storage facilities. iSCSI provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network. iSCSI facilitates data transfers over intranets and to manage storage over long distances. It can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.
Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk, memory card or USB flash drive for initial use. In some cases, the formatting operation may also create one or more new file systems. The first part of the formatting process that performs basic medium preparation is often referred to as "low-level formatting". Partitioning is the common term for the second part of the process, dividing the device into several sub-devices and, in some cases, writing information to the device allowing an operating system to be booted from it. The third part of the process, usually termed "high-level formatting" most often refers to the process of generating a new file system. In some operating systems all or parts of these three processes can be combined or repeated at different levels and the term "format" is understood to mean an operation in which a new disk medium is fully prepared to store files. Some formatting utilities allow distinguishing between a quick format, which does not erase all existing data and a long option that does erase all existing data.
Logical block addressing (LBA) is a common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disk drives. LBA is a particularly simple linear addressing scheme; blocks are located by an integer index, with the first block being LBA 0, the second LBA 1, and so on.
A disk array controller is a device that manages the physical disk drives and presents them to the computer as logical units. It often implements hardware RAID, thus it is sometimes referred to as RAID controller. It also often provides additional disk cache.
Multi-booting is the act of installing multiple operating systems on a single computer, and being able to choose which one to boot. The term dual-booting refers to the common configuration of specifically two operating systems. Multi-booting may require a custom boot loader.
Unified Extensible Firmware Interface is a specification for the firmware architecture of a computing platform. When a computer is powered on, the UEFI-implementation is typically the first that runs, before starting the operating system. Examples include AMI Aptio, Phoenix SecureCore, TianoCore EDK II, InsydeH2O.
In computing, Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed. This can reduce the amount of unnecessary drive head movement, resulting in increased performance for workloads where multiple simultaneous read/write requests are outstanding, most often occurring in server-type applications.
The Advanced Host Controller Interface (AHCI) is a technical standard defined by Intel that specifies the register-level interface of Serial ATA (SATA) host controllers in a non-implementation-specific manner in its motherboard chipsets.
ATA over Ethernet (AoE) is a network protocol developed by the Brantley Coile Company, designed for simple, high-performance access of block storage devices over Ethernet networks. It is used to build storage area networks (SANs) with low-cost, standard technologies.
A live USB is a portable USB-attached external data storage device containing a full operating system that can be booted from. The term is reminiscent of USB flash drives but may encompass an external hard disk drive or solid-state drive, though they may be referred to as "live HDD" and "live SSD" respectively. They are the evolutionary next step after live CDs, but with the added benefit of writable storage, allowing customizations to the booted operating system. Live USBs can be used in embedded systems for system administration, data recovery, or test driving, and can persistently save settings and install software packages on the USB device.
A solid-state drive (SSD) is a type of solid-state storage device that uses integrated circuits to store data persistently. It is sometimes called semiconductor storage device, solid-state device, or solid-state disk.
Target Disk Mode is a boot mode unique to Macintosh computers.
Network Direct Attached Storage (NDAS) is a proprietary storage area network system, originally marketed by the company Ximeta, for connecting external digital storage devices such as hard-disks, flash memory and tape drives via the Ethernet family of computer networks. Unlike other more common forms of networked storage, NDAS does not use TCP/IP to communicate over the network. Instead a Lean Packet Exchange (LPX) protocol is used. NDAS also supports some limited RAID functions such as aggregation and mirroring.
On Linux, network block device (NBD) is a network protocol that can be used to forward a block device from one machine to a second machine. As an example, a local machine can access a hard disk drive that is attached to another computer.
In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.
SCSI / ATA Translation (SAT) is a set of standards developed by the T10 subcommittee, defining how to communicate with ATA devices through a SCSI application layer. The standard attempts to be consistent with the SCSI architectural model, the SCSI Primary Commands, and the SCSI Block Commands standards.
USB Attached SCSI (UAS) or USB Attached SCSI Protocol (UASP) is a computer protocol used to move data to and from USB storage devices such as hard drives (HDDs), solid-state drives (SSDs), and thumb drives. UAS depends on the USB protocol, and uses the standard SCSI command set. Use of UAS generally provides faster transfers compared to the older USB Mass Storage Bulk-Only Transport (BOT) drivers.
NVM Express (NVMe) or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open, logical-device interface specification for accessing a computer's non-volatile storage media usually attached via the PCI Express bus. The initial NVM stands for non-volatile memory, which is often NAND flash memory that comes in several physical form factors, including solid-state drives (SSDs), PCIe add-in cards, and M.2 cards, the successor to mSATA cards. NVM Express, as a logical-device interface, has been designed to capitalize on the low latency and internal parallelism of solid-state storage devices.
From the USB Implementers Forum website: