Recent from talks
Nothing was collected or created yet.
USB mass storage device class
View on WikipediaThis 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 sets interfaces with a number of storage devices.
Uses
[edit]
Devices connected to computers via this standard include:
- External magnetic hard drives
- External optical drives, including CD and DVD reader and writer drives
- USB flash drives
- Solid-state drives
- Adapters between standard flash memory cards and USB connections
- Digital cameras
- Portable media players
- Card readers
- PDAs
- Mobile phones
Devices supporting this standard are known as MSC (Mass Storage Class) devices. While MSC is the original abbreviation, UMS (Universal Mass Storage) has also become common use.
Operating system support
[edit]Most mainstream operating systems include support for USB mass storage devices; support on older systems is usually available through patches.
Microsoft Windows
[edit]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-system 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]
MS-DOS
[edit]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.
Classic Mac OS and macOS
[edit]Apple's Mac OS 9 and macOS support USB mass storage; Mac OS 8.6 supported USB mass storage through an optional driver.[2]
Linux
[edit]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 supports USB mass storage through dual-role USB on USB-C ports, and USB-OTG on older ports.
Other Unix-related systems
[edit]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]
Game consoles and embedded devices
[edit]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.
Device access
[edit]
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:
- Reduced Block Commands (RBC)
- SFF-8020i, MMC-2 (used by ATAPI-style CD and DVD drives)
- QIC-157 (tape drives)
- Uniform Floppy Interface (UFI)
- SFF-8070i (used by ARMD-style devices)
- SCSI transparent command set (use "inquiry" to obtain the PDT)
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.
Design
[edit]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]
See also
[edit]References
[edit]- ^ "Changes in Windows to Meet Changes in Threat Landscape". TechNet Blogs. 2009-04-28. Retrieved 2012-11-07.
- ^ "USB Mass Storage 1.3.5 - Macintosh Repository". www.macintoshrepository.org. Retrieved 2024-11-27.
- ^ "usb-storage.c - drivers/usb/usb-storage.c - Linux source code 2.3.47pre8 - Bootlin Elixir Cross Referencer". elixir.bootlin.com. Retrieved 2024-11-27.
- ^ "usb-storage.c - drivers/usb/usb-storage.c - Linux source code 2.2.18pre2 - Bootlin Elixir Cross Referencer". elixir.bootlin.com. Retrieved 2024-11-27.
- ^ "Traditional storage | Android Open Source Project". source.android.com. sec. USB media support. Retrieved 2024-11-27.
- ^ "eserver: HOWTO: JFS2 on USB device on AIX 5.3.11.1". Eserver.livejournal.com. 2010-01-21. Archived from the original on 2012-03-31. Retrieved 2012-11-07.
- ^ "Xbox Live's Major Nelson » USB Memory Support for the Xbox 360 coming April 6th". Majornelson.com. 2010-03-26. Retrieved 2012-11-07.
- ^ "83Plus:Software:usb8x/Asm Interface/MSD". WikiTI. 2009-02-18. Retrieved 2012-11-07.
- ^ "#25 (SCSI pass through for SMART via USB on MacOSX smartmontools? 3rd party code available!) – smartmontools". Sourceforge.net. Retrieved 2014-01-21.
- ^ "USB smartmontools". Sourceforge.net. Archived from the original on 2012-02-07. Retrieved 2014-01-21.
- ^ "ATA Secure Erase - ata Wiki". Ata.wiki.kernel.org. 2013-07-22. Retrieved 2014-01-21.
Further reading
[edit]From the USB Implementers Forum website:
External links
[edit]- USB Mass Storage Device source code in FreeBSD
- What actually happens when you plug in a USB device? – Linux kernel internals
USB mass storage device class
View on GrokipediaIntroduction
Definition and Purpose
The USB mass storage device class, designated by base class code 08h, is a USB device class standardized by the USB Implementers Forum (USB-IF) specifically for mass storage devices that conform to its specifications.[2][6] This class enables USB devices to emulate conventional block storage devices, such as hard disk drives, by transporting standard command sets, primarily SCSI, over the USB bus, thereby facilitating plug-and-play connectivity for file transfer and storage access without requiring proprietary host drivers.[7][1] It primarily employs the bulk-only transport protocol to handle command, data, and status exchanges via bulk endpoints.[8] Among its key benefits are vendor-neutral interoperability, which ensures compatibility across diverse device implementations; support for essential read and write operations; and native integration with host file systems for transparent data management.[7][1] The initial overview document for the specification, version 1.0, was released on October 22, 1998, followed by the full specification details in version 1.1 on June 28, 2000.[1]History and Development
The USB Mass Storage Device Class (MSC) originated in the late 1990s as a standardized protocol within the USB 1.1 specification, released in 1998, to enable seamless integration of storage devices over USB without relying on vendor-specific proprietary drivers that had previously complicated device compatibility and deployment.[1] This development was driven by the need for a universal interface for mass storage peripherals, building on the foundational USB architecture established by the USB Implementers Forum (USB-IF) to promote interoperability across diverse hardware ecosystems.[9] The initial MSC Overview Specification version 1.0 was released on October 22, 1998, providing the core framework for bulk-only transport and control/bulk/interrupt (CBI) mechanisms tailored to storage devices.[1] Version 1.1 followed on June 28, 2000, refining the specification for broader adoption under USB 2.0 enhancements.[1] By version 1.2, released June 23, 2003, updates included an expanded list of supported command sets and restrictions on CBI usage to full-speed floppy drives, improving reliability and error management in transport protocols.[1] The specification evolved further with version 1.3 in September 2008, incorporating features like MSC-Lock for secure access and IEEE 1667 compliance for key management, while version 1.4, finalized February 19, 2010, introduced the USB Attached SCSI Protocol (UAS) to leverage USB 3.0's higher speeds, released in 2008, for more efficient command queuing and data transfer.[1] A 2013 addendum extended UAS support for bootable devices.[4] The rapid proliferation of USB flash drives in the early 2000s, starting with commercial releases in 2000 offering capacities from 8 MB, significantly boosted MSC adoption by providing portable, plug-and-play storage that aligned with the class's standardized approach.[10] The USB-IF played a pivotal role in this evolution by enforcing backward compatibility across USB revisions, ensuring legacy MSC devices remained functional on newer hosts and peripherals.[1] In contemporary contexts, MSC has seen partial deprecation in certain modern devices, such as smartphones, where protocols like Media Transfer Protocol (MTP) and Picture Transfer Protocol (PTP) are preferred for enhanced security and selective file access without exposing the entire filesystem.[11]Technical Specifications
Protocol and Transport Mechanisms
The USB Mass Storage Device Class primarily employs the Bulk-Only Transport (BOT) protocol, which leverages USB bulk transfers for efficient communication between the host and device, utilizing dedicated Bulk-In and Bulk-Out endpoints for data movement while relying on the default control pipe for initial setup and class-specific requests.[8] This transport mechanism avoids the use of interrupt endpoints for core operations. BOT ensures reliable, asynchronous data transfer suitable for mass storage applications by segmenting operations into distinct phases: command issuance, optional data transfer, and status reporting.[8] At the heart of the BOT protocol is the Command Block Wrapper (CBW), a 31-byte structure sent from the host to the device via the Bulk-Out endpoint to initiate a command; it includes a signature (43425355h), the data transfer length and direction, the logical unit number (LUN), and the command block itself (typically 16 bytes, accommodating SCSI commands).[8] Following the CBW, if data transfer is required, packets are exchanged using the appropriate bulk endpoint based on the specified direction and length, ensuring alignment on USB packet boundaries to maintain protocol integrity.[8] The sequence concludes with the Command Status Wrapper (CSW), a 13-byte response from the device via the Bulk-In endpoint, containing a signature (53425355h), the residual data length, and a status code (00h for success, 01h for failure, or 02h for phase error).[8] Endpoint configuration in BOT follows standard USB practices, with the default pipe handling device enumeration, configuration, and class-specific requests such as the USB Mass Storage Reset; the Bulk-Out endpoint receives commands and outbound data, while the Bulk-In endpoint transmits inbound data and status.[8] This setup supports multiple logical units if needed, addressed via the CBW's LUN field, and is designed for simplicity and broad host compatibility.[8] Error handling in BOT emphasizes robustness through endpoint stalling: upon detecting issues like an invalid CBW signature, insufficient buffer space, or command failure, the device stalls the relevant bulk endpoints to signal the host, prompting clearance via a CLEAR_FEATURE request.[8] For severe errors or protocol resets, the host issues a class-specific USB Mass Storage Reset request over the default pipe, after which it must clear halts on both bulk endpoints and potentially reinitialize the session to resume operations.[8] These mechanisms ensure recovery without full device disconnection, maintaining session continuity.[8] The BOT protocol was formalized in revision 1.0 of the USB Mass Storage Class Bulk-Only Transport specification, released in 1999 and aligned with USB 1.0 and 1.1 standards.[8] Subsequent refinements have maintained its core structure while ensuring compatibility with USB 2.0 high-speed and USB 3.x SuperSpeed modes through the inherent scalability of bulk endpoints, allowing BOT devices to operate at higher data rates on modern hosts for backward compatibility.[12] This enduring design has made BOT the de facto transport for legacy and simple mass storage implementations across USB generations.[8]Command Sets and Data Transfer
The USB Mass Storage Device Class primarily employs a subset of SCSI commands to manage storage operations, encapsulated within the Bulk-Only Transport (BOT) protocol for compatibility with a wide range of block devices.[1] Key commands in this subset, defined under subclass code 06h for SCSI transparent command set, include READ(10) for retrieving specified blocks of data, WRITE(10) for storing data to blocks, INQUIRY for querying device characteristics, and TEST UNIT READY for verifying device operational status.[1] These commands are wrapped in a Command Block Wrapper (CBW) sent via the bulk-out endpoint, followed by data phases and a Command Status Wrapper (CSW) via the bulk-in endpoint, ensuring reliable transaction handling without command queuing.[8] Optionally, devices may support ATA pass-through commands, such as those defined in the SCSI ATA Translation (SAT) standard, allowing direct issuance of ATA/ATAPI instructions through SCSI envelopes for compatibility with legacy IDE/SATA storage.[1] This is typically implemented under the same SCSI transparent subclass, using commands like ATA PASS-THROUGH (16) to bridge protocols without altering the core USB transport.[8] Data transfers in the class rely on USB bulk transfers for efficient movement of large data blocks between host and device, utilizing dedicated bulk-in and bulk-out endpoints to handle directional flows—host-to-device for writes and device-to-host for reads.[8] While BOT does not natively support scatter-gather at the protocol level, host controllers can implement scatter-gather DMA for non-contiguous memory buffers during these bulk operations, optimizing performance for fragmented data accesses.[8] Block sizes are standardized at 512 bytes for most devices to align with traditional sectoring, though modern implementations support larger logical block sizes up to 4096 bytes or more via extended SCSI commands like READ CAPACITY (16).[13] During initialization, the INQUIRY command response identifies the device as a direct-access block device with peripheral device type 00h and peripheral qualifier 00b, indicating a connected, fully functional storage peripheral capable of random access.[1] This data structure, at least 36 bytes long, provides essential parameters like device type and version for host configuration.[3] The class imposes limitations on advanced storage features; for instance, without protocol extensions, it lacks native support for caching, command queuing, or error recovery mechanisms beyond basic SCSI sense codes, restricting throughput to sequential, single-command operations.[1] BOT's design prioritizes simplicity and broad interoperability, capping logical units at 16 (including LUN 0) and prohibiting bidirectional data in a single transaction.[8]USB Attached SCSI (UAS) Enhancements
The USB Attached SCSI (UAS) protocol, also known as USB Attached SCSI Protocol (UASP), was introduced in the USB Mass Storage Class specification revision 1.4 in 2010 to leverage USB 3.0 capabilities as a high-performance alternative to the Bulk-Only Transport (BOT) protocol within the USB Mass Storage Class.[1] Unlike BOT, which processes commands sequentially and mixes command, data, and status transfers on shared bulk endpoints, UAS employs a dedicated four-pipe model—separate endpoints for commands, status, data-in, and data-out—enabling asynchronous command queuing and pipelining to better utilize USB bus bandwidth.[14] This design aligns with the SCSI Architecture Model (SAM-4), transporting standard SCSI commands over USB while leveraging USB streams for efficient data handling.[15] Key enhancements in UAS include support for multiple outstanding commands, allowing multiple outstanding commands with task attributes such as SIMPLE, HEAD OF QUEUE, or ORDERED to manage execution priorities, with queue depth depending on device implementation.[15] Pipelining reduces latency by eliminating the round-trip delays inherent in BOT's sequential model, where each command typically requires three bulk transfers.[14] UAS also incorporates advanced task management functions, including ABORT TASK, CLEAR TASK SET, and LOGICAL UNIT RESET, which enable the host to interrupt or reset specific operations without affecting the entire device.[15] Error recovery is improved through mechanisms that allow the host to detect and clean up incomplete transactions, such as data underruns, before proceeding with subsequent commands, enhancing reliability in high-speed environments.[14] For compatibility, UAS devices must include a BOT-compatible alternate interface, enabling fallback to BOT mode on USB 2.0 hosts or systems lacking UAS support, ensuring broad interoperability while requiring explicit endorsement from both host controllers and devices for full UAS operation.[1] Performance benefits are particularly evident in USB 3.0 and later, offering significant performance improvements, particularly for random I/O and multi-command workloads, compared to BOT due to reduced overhead and parallel processing. UAS adoption has grown with USB 3.0 devices, becoming standard for many high-speed storage enclosures, though it remains optional under the USB Mass Storage Class specification and is not explicitly mandated for USB 3.1 or later compliance.[1]Applications and Compatibility
Common Device Types
The USB mass storage device class (MSC) is widely implemented in primary storage devices that provide plug-and-play access to data via USB connections. USB flash drives, also known as thumb drives, represent one of the most ubiquitous examples, utilizing flash memory for compact, removable storage capacities ranging from gigabytes to terabytes. These devices adhere to the Bulk-Only Transport protocol within the MSC specification, enabling seamless enumeration as block devices by host operating systems. External hard disk drives (HDDs) and solid-state drives (SSDs) connected via USB also commonly employ the MSC, offering high-capacity storage for backups and data transfer, with speeds enhanced by USB 2.0 or later interfaces introduced around 2000. Additionally, USB card readers for SD and microSD cards function under the MSC, allowing direct access to memory cards from cameras and mobile devices without proprietary drivers. In multimedia applications, the MSC facilitates storage access in devices like digital cameras and portable audio players. Many digital cameras from manufacturers such as Sony support a "Mass Storage" USB mode, exposing internal memory or memory card contents as a removable disk for file transfer. MP3 players and portable media players often implement the MSC to present their internal storage partitions, enabling users to drag-and-drop audio files directly from a host computer, as seen in models from SanDisk that switch between MSC and other protocols for compatibility. Other device types leveraging the MSC include external optical drives and specialized USB peripherals. USB CD and DVD drives typically operate under the MSC using SCSI command sets, allowing read/write access to optical media as if connected internally. Some printers incorporate internal storage or USB host functionality but may expose firmware or temporary storage via MSC during driver installation or direct printing modes. Bootable USB keys, essentially configured USB flash drives, utilize the MSC for BIOS/UEFI booting, supporting live operating systems and recovery tools by presenting a bootable partition. The adoption of the USB MSC significantly contributed to the portable storage boom following 2000, coinciding with the commercialization of USB flash drives like the 8 MB ThumbDrive introduced that year. This standardization simplified data portability across devices, reducing reliance on proprietary connectors and driving market growth in consumer electronics. An early example of advanced features was the SanDisk U3 smart drive launched in 2005, which combined MSC storage with executable application support on the device itself. Operating systems generally recognize these MSC devices as generic block devices, integrating them into file explorers without additional configuration. Rare exceptions include the use of mobile phones to emulate USB mass storage devices for purposes such as BIOS updates. Older Android phones from the pre-2010s that supported USB Mass Storage mode could mimic a real drive when connected to a host. However, this capability is uncommon today due to its deprecation in modern Android versions. With a rooted modern Android phone and applications like DriveDroid, it is possible to emulate a USB drive or boot ISOs by setting up a virtual FAT32 image with the necessary files. This method is complicated, risky—potentially leading to bricking the motherboard if the flash fails mid-process—and not guaranteed to be detected by the BIOS. iPhones cannot emulate mass storage at all, relying instead on protocols like MTP or PTP. These methods are not recommended due to their complexity and risks.[16][17]Supported File Systems
USB mass storage devices present block-level storage to the host operating system, allowing the use of various file systems depending on the OS and compatibility requirements. The most universally supported formats are the FAT family, including FAT12, FAT16, and FAT32, which ensure broad interoperability across Windows, macOS, Linux, and embedded systems due to their simplicity and legacy support.[18][19] These formats are particularly common on pre-formatted USB devices, often paired with Master Boot Record (MBR) partitioning for volumes up to 2 TB, though GUID Partition Table (GPT) is increasingly used for larger capacities to support modern UEFI booting.[20] For handling files larger than 4 GB— a limitation of FAT32—exFAT provides cross-platform compatibility, with native read/write support in Windows (since Windows 7), macOS (since 10.6.5), and Linux (via kernel modules since version 5.4).[18][21] NTFS, Microsoft's primary file system, offers advanced features like journaling and encryption but is primarily optimized for Windows, where it provides full read/write access; macOS and Linux offer read-only support natively, requiring third-party drivers (e.g., NTFS-3G or the kernel's ntfs3 module) for writing.[22] Operating system-specific file systems further influence compatibility. On macOS, HFS+ (Hierarchical File System Plus) and APFS (Apple File System) are native, with full support for USB devices formatted in these schemes, though they lack native readability on Windows without additional software.[18] Linux natively supports ext2, ext3, and ext4 for USB storage, enabling efficient use in Unix-like environments, but these formats are not readable on Windows or macOS without extensions. Cross-platform limitations often necessitate FAT32 or exFAT for shared use, as mismatched formats can lead to inaccessible data or require reformatting. Partitioning schemes like MBR and GPT are handled at the block level via the USB Mass Storage Class's SCSI emulation, with devices typically shipping with a single MBR-partitioned FAT32 volume for maximum compatibility. Compatibility issues arise from write protection modes, which some devices enforce to prevent accidental overwrites, and the need for proper ejection protocols—such as Windows' "Safely Remove Hardware" or Linux'sumount command—to avoid file system corruption during removal.[7] Failure to eject safely can result in data loss, particularly on non-journaled systems like FAT.[23]
