Mounting is a process by which a computer's
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
makes
files and
directories on a
storage device (such as
hard drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
,
CD-ROM
A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains computer data storage, data computers can read, but not write or erase. Some CDs, called enhanced CDs, hold b ...
, or
network share) available for users to access via the computer's
file system.
In general, the process of mounting comprises the operating system acquiring access to the storage medium; recognizing, reading, and processing file system structure and metadata on it before registering them to the
virtual file system (VFS) component.
The location in the VFS to which the newly mounted medium was registered is called a "
mount point"; when the mounting process is completed, the user can access files and directories on the medium from there.
An opposite process of mounting is called unmounting, in which the operating system cuts off all user access to files and directories on the mount point, writes the remaining queue of user data to the storage device, refreshes file system metadata, then relinquishes access to the device, making the storage device safe for removal.
Normally, when the computer is
shutting down, every mounted storage device will undergo an unmounting process to ensure that all queued data was written to it, and to preserve the integrity of the file system structure on the media.
Overview
A mount point is a location in the
partition used as a root filesystem. Many different types of storage exist, including magnetic, magneto-optical, optical, and semiconductor (solid-state) drives. Before any of them can be used for storage, the means by which information is read and written must be organized and knowledge of this must be available to the operating system. The organization is called a filesystem. Each different filesystem provides the host operating system with
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
so that it knows how to read and write data. When the medium (or media, when the filesystem is a volume filesystem as in
RAID
RAID (; redundant array of inexpensive disks or redundant array of independent disks) is a data storage virtualization technology that combines multiple physical Computer data storage, data storage components into one or more logical units for th ...
arrays) is mounted, these metadata are read by the operating system so that it can use the storage.
Unix-like operating systems often include software and tools that assist in the mounting process and provide it new functionality. Some of these strategies have been coined "auto-mounting" as a reflection of their purpose.
In many situations, file systems other than the root need to be available as soon as the operating system has booted. All Unix-like systems therefore provide a facility for mounting file systems at boot time. System administrators define these file systems in the configuration file
fstab (vfstab in Solaris), which also indicates options and mount points. In some situations, there is no need to mount certain file systems at boot time, although their use may be desired thereafter. There are some utilities for Unix-like systems that allow the mounting of predefined file systems upon demand.
Removable media
Removable media have become very common with microcomputer platforms. They allow programs and data to be transferred between machines
without a physical connection. Common examples include
USB mass storage (flash drives), memory cards, CD-ROMs, and DVDs. Utilities have therefore been developed to detect the presence and availability of a medium and then mount that medium without any user intervention.
Some Unix-like systems have also introduced a concept called ''supermounting'', as implemented in the Linux supermount-ng project.
For example, a floppy disk that has been supermounted can be physically removed from the system. Under normal circumstances, the disk should have been synchronized and then unmounted before its removal. Provided synchronization has occurred, a different disk can be inserted into the drive. The system automatically notices that the disk has changed and updates the mount point contents to reflect the new medium. Similar functionality is found on Windows machines.
An
automounter
An automounter is any program or software facility which automatically mount (computing), mounts filesystems in response to access operations by user programs. An automounter system utility (Daemon (computer software), daemon under Unix), when not ...
will automatically mount a file system when a reference is made to the directory atop which it should be mounted. This is usually used for file systems on network servers, rather than relying on events such as the insertion of media, as would be appropriate for removable media.
See also
*
Mount (Unix)
References
{{Reflist
Computer file systems