Differences between volume, partition and drive
The term drive refers to a physical storage device such as a hard disk, solid-state disk, removable USB flash drive etc. In Unix-like operating systems, devices are represented by special file system objects called device nodes which are visible under the /dev
directory.
Storage devices are labeled under /dev
according to the type of device followed by a letter signifying the order in which they were detected by the system. In Linux prior to kernel version 2.6.20 the prefix hd signified an IDE device, so for instance the device files /dev/hda
, /dev/hdb
and /dev/hdc
corresponded to the first, second and third IDE device respectively. The prefix sd was originally used for SCSI devices, but is now used for all PATA and SATA devices, including devices on an IDE bus. If there are more than 26 such devices in the system, devices from the 27th onwards are labeled /dev/sdAa
, /dev/sdAb
and so on.
A physical storage device can be divided into multiple logical storage units known as partitions. Each partition will show up under /dev
as a separate device node. A number after the device letter signifies the number of the partition. For example, the device node files /dev/sda1
and /dev/sda2
refer to the first and second partition of the first PATA device. Note that on PCs using MBR partitioning, due to the limit of four primary partitions and the way extended partitions are handled, the partition numbering can slightly differ from the actual partition count.
Other Unix-like systems may refer to disks and partitions in other ways. For example, FreeBSD uses /dev/adaX
(where X is one or more digits) to refer to PATA disks and /dev/adaXpY
(where X and Y are both one or more digits) to refer to partitions on PATA disks.
The term volume in Linux is related to the Logical Volume Manager (LVM), which can be used to manage mass storage devices. A physical volume is a storage device or partition. A logical volume created by the LVM is a logical storage device which can span multiple physical volumes.
A drive is a physical block disk. For example:
/dev/sda
.A partition A drive can be divided into some logic block disk. These logic block disk are named partition. For example:
/dev/sda1
,/dev/sda2
.A volume is also a logic block disk. Volume is a concept involved with partition. A volume can contain many partition. You can take a look at LVM project to understand the concept of a volume. http://sourceware.org/lvm2/.
For example: vg0/lvol0
What do these terms mean exactly?
TLDR version:
Volume implies formatting and partition does not. A partition is just any continuous set of storage sectors listed in some table (e.g. MBR/GPT). A volume is a set of sectors belonging to the same filesystem, i.e. an implemented filesystem.
If you've formatted your partitions without an LVM, then each of your partitions is probably occupied by a single volume. In modern usage a drive is the set of all sectors belonging to a single piece of (virtual) hardware, from the perspective of the operating system.
So we partition drives and format partitions and mount volumes.
On Windows, one may say drive C: or partition C:
Actually, on Windows the correct wording is "C volume" though I think they can be renamed if you don't like using letters. MS sometimes refers to mounted volumes as disks or drives, but in their online documentation they are more careful and use "volume".
Full answer:
I'm not sure what should be used for partitions because they don't have a name [tag or label]
(A minor sidenote here is that GPT partitions can be labeled, as can most filesystems)
Conventionally partitions are formatted with a single complete volume and are named after their purpose. So you can call them [purpose + partition], e.g. home partition, boot partition, rootfs partition, etc. On Windows the word "drive" is more common, though officially MS uses the word volume which is probably the most correct. I think calling them drives is a bit sloppy. Read on for why.
Etymologically, "drive" originates from motorized hardware that read various media like tapes, floppies and disks. So the things that held the data-containing media were called 'drives' for short. To emphasize: drives read media, media held data. Though "drive" probably stems from the motorized nature of the hardware, the definition could be stretched to include non-motorized hardware like a flash card reader.
This means technically drives themselves can't be partitioned. The media they contain, such as a cd or magnetic disks or MMC flash memory, can be partitioned. Partitioning only means defining sets of borders (by media sector) in a table. The table typically gets stored in the first few sectors of the storage medium. These table entries may also include other stuff like formatting information, which defines what filesystem a partition uses (if any).
Nowadays "drive" has gained the more abstract meaning of 'physical data container', replacing the word "disk" somewhat. This is probably because:
The most common drives tend to have non-removable media, making us think of them as storage containers instead of read/write devices.
The advent of non-disk media like flash memory. "Disk" is too specific to a type of technology, e.g. it feels odd talking about disks with a USB stick. This also applies to logical devices (RAID arrays), which have become more common. Instead of using specific words for each type, we call everything a drive.
The media/reader distinction wasn't very useful. More often we want to refer to the media, though the OS interfaces with the drive. So it is enough to know that we use drives to access data. Making "drive" an abstract concept for storage media was just part of the evolution of CS jargon.
According to this newer definition, drives can be partitioned. When we refer to an optical disk reader as our E:\
drive we are using the old definition. When we say we're partitioning a drive we are using the newer definition.
A volume is a single accessible storage area with a single file system. --Wikipedia
So a formatted partition may be considered a type of volume. Traditionally a DVD or CD consists of a single volume, as they do not have partitions. But a volume may also consist of multiple drives, or non-continuous parts of a single drive, or both. A partition is by definition a continuous segment of a single drive. Such complex volumes exist on so-called logical or virtual devices/drives, but unless you have a good reason, using logical volume managers isn't worth the hassle.
Lastly, some hardware (e.g. RAID) controllers may present a logical/virtual device directly to the operating system. This means partitions are continuous sectors of a logical device (i.e. from the OS perspective), the partitions could span several physical disks.
To sum up:
- You can partition storage media, not drives. But(!) "drive" is often used synonymously with storage media. E.g. "partitioning a HDD" is a commonly used phrase, instead of the more correct "partitioning the HDD storage media", or "partitioning the HD".
- It would be better to say we create partitions on drives, since it can be said that storage resides on or in a drive. Note that data is not partitioned either, "data" is an abstract concept.
- We mount volumes, not filesystems. A filesystem just describes the abstract format of file/folder storage.
- A drive (i.e. storage medium) with partitions has a single partition table, but don't assume that every C: or D: 'drive' (volume) on Windows has its own partition table.