Volume (computing)
This article needs additional citations for verification. (September 2014) |
In computer data storage, a volume or logical drive is a distinctly-addressable storage area with a single file system.
Storage can be designed and configured in many different and complex ways yet all include the volume concept. A general-purpose mass-storage device is typically divided into partitions with each partition used as a volume with its own file system. A more specialized mass-storage device may be configured for redundancy where a volume spans multiple storage media or physical drives. A smaller storage such as a memory card or floppy disk might have only one partition or no partition at all (no partition table) such that the volume is logically indistinguishable from the drive. A simple volume describes the most basic configuration: a volume on one storage medium with no redundancy or striping.
The following table describes an example storage configuration for a Windows system with two physical drives where the first drive has two partitions, and the second has only one. Each partition is treated as a volume with its own file system. The drive letters C:, D:, and E: each identify a volume, a.k.a. logical drive.
| Physical drive |
Partition | Filesystem type |
Drive letter |
|---|---|---|---|
| D0 | P0 | NTFS | C: |
| P1 | FAT32 | D: | |
| D1 | P0 | FAT32 | E: |
An operating system (OS) can potentially recognize a partition without recognizing a volume associated with it, as when a partition has not been formatted for a file system or is using a file system that the OS does not support. This occurs, for example, when Windows encounters a non-native partition, such as the ext4 filesystem commonly used with Linux.
A volume can be packed in a single file. Examples include the ISO9660 disc image (CD/DVD image, commonly called "ISO"), and the installer volume for Mac OS X (Apple Disk Image). As these volumes are files in a host volume, they are not partitions.
The concept of volume applies to any type of storage medium. But, for historical reasons, the term disk is often used even for non-disk media. For example, the Windows Disk Management utility supports any type of medium.
Operating system support
[edit]Although the concept of volume is relatively consistent throughout computing contexts, there are significant differences in implementation and user experience between major categories of operating systems.
Microsoft systems
[edit]In Windows, volumes are handled by the kernel. Volumes and mount points and configured by the user via the Disk Management utility or the diskpart command.
Unlike in a Unix-like system, Microsoft systems do not have a single root directory. The system assigns at least one path to each mounted volume – either a drive letter (shown as a letter followed by a colon) such as F: or a mount point on an NTFS volume having a drive letter, such as C:\Music. In this case, the file Track1.mp3 stored in the root directory of the mounted volume could be referred to via paths F:\Track1.mp3 or C:\Music\Track1.mp3, respectively.
In order to assign a mount point for a volume as a path within another volume, the following criteria must be met:
- The mounted-to volume must be formatted NTFS
- A directory must exist at the root path; as of Windows Vista, it can be any subdirectory in a volume
- That directory must be empty
By default, Windows assigns drive letters to all drives. It reserves A: and B: for floppy disk drives, whether present or not. It uses C: and subsequent letters for all other drives (e.g. SDD, HDD, CD, DVD). The operating system startup drive is most commonly assigned C:, however this is not always the case. Since personal computers now no longer include floppies, and optical disc and other removable drives typically still start at D:, letters A and B are available for assignment by a user with administrative privileges. This assignment is used each time a removable volume is inserted as long as various criteria are satisfied including that the removable drive has not been reformatted on another computer (which changes its volume serial number).
More than one drive letter can refer to a single volume. This can be configured via the SUBST command.
Removing or changing a drive letter or mount point assignment may break program functionality, as files are not accessible via the same path. For example, if a program is configured to use files in directory D:\Data and then drive letter D: is unassigned, the program no longer can access its data since D:\Data is no longer a valid path.
In Windows Server 2008 and onward, the term "volume" is used as a superset that includes "partition".[1][2][3]
Unix-like systems
[edit]In a Unix-like system, volumes are usually handled by the Logical Volume Manager or the Enterprise Volume Management System. Volumes are configured via the mount command.
A volume other than the boot volume has a mount point somewhere within the filesystem, represented by a path. Logically, the directory tree stored on the volume is grafted in at the mount point. By convention, mount points are often placed in a directory called /mnt, though /media and other paths are also common. For example, if a CD-ROM drive containing a text file called info.txt is mounted at /mnt/iso9660, the text file would be accessible at path /mnt/iso9660/info.txt. To use a path as a mount point, a directory must exist at that path.
Data management speed
[edit]Generally, a file in a volume can be moved to any other path within that volume by simply changing filesystem metadata rather than copying file content. However, if a file is moved to a path that is on a different volume, then the file content is copied to the target and deleted from the source volume (which takes significantly longer to complete).
Identification
[edit]Often, a volume is identified within a system by either or both a user-assignable and more human-readable identifier and a more fixed and globally-unique identifier that may be less human-readable. Identifier attributes and use varies by computing context.
Origin
[edit]Use of volume serial numbers originated in the 1950s with mainframes. In the OS/360 line, it user-configurable, has a maximum length of six characters, is uppercase and must start with a letter. For example, "SYSRES" is often used for a system residence volume. Operating systems may use the volume serial number as mount point name.[4]
FAT and NTFS
[edit]
A volume label is a user-assignable identifier for a volume. In the FAT filesystem, a volume label is restricted to 11 characters (reflecting the 8.3 restriction although not divided into name and extension) even when long file name is enabled. It is stored as an entry within a disk's root directory with a special volume-label attribute bit set, and also copied to an 11-byte field within the Extended BIOS Parameter Block of the disk's boot sector. The label is stored as uppercase in FAT and VFAT, and cannot contain special characters that are also disallowed for regular filenames. In the NTFS filesystem, the length of its volume label is restricted to 32 characters, and can include lowercase characters and even Unicode.[5] In exFAT, the length is restricted to 11 characters, but can include lowercase and Unicode characters. A label can be changed in Windows Explorer via keyboard shortcut F2 while a volume is selected or via a volume's context (right-click) menu. The label command supports changing the label from the command line.
A volume serial number is a serial number assigned to a storage medium that is generally both unique and not editable by the user. It provides a consistent and reliable identifier for the volume. In particular, it allows for determining when a volume has been added to or removed from a system. Formatting a volume typically changes the serial number, but relabeling does not.[6] In the FAT and NTFS file systems, a volume serial number is used to determine if a volume is present in a drive or not, and to detect if it was exchanged with another one. This identification system was designed during their development of OS/2.[7] It was introduced in MS-DOS 4.01 in 1988. The serial number is a 32-bit number determined by the real-time clock reading of the host computer when the volume is formatted. Previously, determination of whether a volume was swapped was done by reading the volume label. However, even at that time the volume label was both optional and not required to be unique which resulted in incorrect detection of media changes.
Both the dir and vol commands report the label and serial number of a volume.
References
[edit]- ^
"Understanding Disk Terminology". Microsoft Corporation. Retrieved 2014-06-10.
Partition A portion of the hard disk. In many cases, this is the entire hard disk space, but it needn't be. Volume A unit of disk space composed of one or more sections of one or more disks. Prior versions of Windows Server used volume only when referring to dynamic disks, but Windows Server 2008 uses it to mean partitions as well.
- ^
"Partitions and Volumes". Microsoft Corporation. Retrieved 2014-06-10.
In Windows Server 2008 the distinction between volumes and partitions is somewhat murky. When using Disk Management, a regular partition on a basic disk is called a simple volume, even though technically a simple volume requires that the disk be a dynamic disk.
- ^
"Use Built-In Tools to Create Partitions and Volumes in Windows Server". Microsoft Corporation. 2008-06-18. Retrieved 2014-06-10.
Windows Server 2008 simplifies the Disk Management user interface by using one set of dialog boxes and wizards for both partitions and volumes.
- ^ "Issue with .XPSF playlists".
- ^ Label - Disk label - Windows CMD - SS64.com
- ^ Glass, Brett (1998-02-06). "Changing a Disk's Volume Serial Number". Brett Glass To The Rescue. Retrieved 2006-07-28.
- ^ Letwin, Gordon (1988). Inside OS/2. Microsoft Press. ISBN 1-55615-117-9.
External links
[edit]- MSDN's article on Hard Links and Junctions