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 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.
FAT and NTFS 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. 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 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. 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. 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==