Family Best Time >> Electronics

Understand the difference between a disk, drive, volume, partition, and image

In a Unix system like Ubuntu or macOS, you will see references to storage devices by multiple names. There are disks, partitions, volumes, and images, as well as the ever-popular containers and drives. Windows computers use a similar naming scheme, but there may be small differences. Let's take a look at the definition differences between a drive, disk, volume, partition, and image.

ContentsDriveDiskPartitionVolumeImageContainersConclusion

Drive

Understand the difference between a disk, drive, volume, partition, and image

A partition is very similar to a volume. In fact, the two terms are used almost interchangeably. Even system programs like macOS Disk Utility do not distinguish between unformatted partition and formatted volume. But if we want to be precise, a “partition” is a piece of disk. It does not necessarily contain a file system and may not be formatted to store data. Instead, a partition is just a part of a disk with a specific size, which is set at creation time. A partition can be resized, but this requires rewriting the disk's partition table and possibly erasing data.

The volume

Understand the difference between a disk, drive, volume, partition, and image

A volume is the part of the disk that you interact with as a user. While partitions and volumes are coterminal, a volume has a name and a filesystem in addition to a size. When you mount a storage device and its icon appears in your file browser, you see the volume. Multiple volumes can be stored on a single disk, and operating systems keep track of which volumes are on which drives. Open "Disk Utility" on macOS or Disks in Ubuntu and you'll see your familiar volume names under cryptic-looking disk names.

Image

Understand the difference between a disk, drive, volume, partition, and image

Images work like volumes, but they don't have any physical hardware attached to them. They are like an image of a physical volume, containing every bit stored on the captured volume. You can create an image of any volume, whether stored on a hard drive or a CD, and store it on any other device that has enough free space. Windows uses images for system backups (called system images) that can be smaller than the disk they capture. This is because images generally do not store empty space. An image must be mounted or attached before it can be accessed, just like a drive. It also has its own file system and can be "cloned" to another volume to copy the contents of the imaged volume.

Containers

Understand the difference between a disk, drive, volume, partition, and image

Some file systems also use containers. Specifically, macOS recently introduced containers to its new file system, Apple File System (APFS). Containers are separate from the other items on this list and work a bit differently. In APFS, disks contain containers and containers contain volumes. Volumes in a given container are allowed to share space allocated to the container, which has a defined maximum size. This means volumes can be flexible, expanding to accommodate files, or shrinking to allow other volumes to grow. This is very different from fixed partitions of other file systems like ext4, HFS+ or ExFAT. The size of partitions under these file systems is specified at creation time, and changing the size of a partition requires rewriting the partition table. APFS, however, resizes volumes within a container on the fly to accommodate data.

Conclusion

In short, disks contain volumes that contain data. Discs are the physical manifestation of a drive. Containers are used instead of partition tables in the APFS file system. Images are "pictures" of the data on a volume, capturing the exact bit layout on a drive.

Image credit:Cambridge Avaragado