What do these terms mean exactly?
On Windows, one may say
drive C: or
partition C:. On Linux I'm not sure what should be used for partitions because they don't have a name.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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
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/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/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/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.
A partition A drive can be divided into some logic block disk. These logic block disk are named partition.
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/.
What do these terms mean exactly?
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".
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:
A Disk = A block device = A storage device, e.g. SSD, hard disk
A section of a storage device is called as partition which is in no way filesystem that what is done to it via OS.
As to meaning of the volume, there are 2 types either physical or logical.
A physical volume from the point of view of your computer a physical hard disc.
A logical volume is a logical disc which may spread across multiple physical discs.
The easiest way to think of a physical volume (PV) is that it is a physical partition that has a partition type of “Linux LVM” (type 8e - fdisk or type 8e00 - gdisk) and has been "marked" as a PV using pvcreate -- meaning that it can now be added to a volume group (VG). From the VG, logical volumes (LV) can be created.