skip to content

On a Mac formatted with APFS, why do several volumes on the same startup disk each report roughly the same amount of free space, and what is the relationship between an APFS container and the volumes inside it?

level: middleimportance: must knowfreq 65%

answer

  1. one partition, many filesystems
  2. space is pooled, not carved
  3. nothing is sized at format time
  4. reserve and quota are optional
  5. every volume reports container free space

basics

~20 s

An APFS container owns all the blocks of its partition, and every volume inside it allocates from that one shared free pool. Volumes therefore have no fixed size, and each reports the container's remaining space as its own available space.

solid answer

~50 s

APFS puts a single **container** on a partition, and the container — not the filesystem — owns the blocks, the free-space bitmaps and the space manager. The **volumes** inside it (Macintosh HD, the Data volume, Preboot, Recovery, VM) are full filesystems with their own directory trees, but no private slice of disk: each one asks the container's space manager for blocks on demand and returns them to the same pool when files are deleted. That is why `df` prints nearly the same available figure for every volume — they are all reporting the container's free space, not a private allowance. Volumes grow and shrink with no repartitioning, which is the big change from the HFS+ world where a partition's size was fixed at creation. If you need guarantees, a volume can optionally carry a reserve (a guaranteed minimum) or a quota (a hard maximum); by default neither is set, so one greedy volume can starve its neighbours.

code

bash · 1 line
bash
df -h / /System/Volumes/Data

go deeper

for a junior

Know the vocabulary in order: partition holds a container, container holds volumes. Be able to say that volumes share free space instead of each owning a fixed slice.

for a middle

Explain that the container owns the block allocator and free-space bitmaps, that volumes allocate on demand, and that reserve and quota are the optional per-volume constraints on that sharing.

for a senior

Show you have reasoned about the failure mode: shared space means no isolation, so a runaway volume, a stale snapshot or a clone divergence starves everything in the container at once. Say how you would bound it.

for a principal

Own the trade-off. Space sharing removes an entire class of capacity-planning toil but replaces it with a noisy-neighbour problem inside one blast radius; argue when separate containers or separate disks are worth the rigidity.

## The layer that owns the blocks When a disk is set up for APFS, the GPT partition is not formatted as a filesystem directly. It is formatted as an **APFS container** (the partition carries the APFS Container Scheme type). The container is the storage owner: it holds the space manager and free-space bitmaps, the checkpoint areas that make copy-on-write metadata updates atomic, and the object maps that let several filesystems reference blocks in the same pool. A container can even span more than one physical device, which is how a Fusion Drive presents an SSD and a hard disk as one container. ## What a volume is under that Inside the container live **volumes**. A volume is a complete filesystem: its own root directory, its own file and extent records, its own encryption state, its own mount point, its own case-sensitivity setting. What it does *not* have is a private region of disk. When a volume needs a block it asks the container's space manager; when a file is deleted the block goes back to the container, where any other volume may take it next. A current Apple silicon Mac's startup container typically holds five volumes: the read-only System volume, the writable Data volume, plus Preboot, Recovery and VM (the swap/sleepimage volume). Nobody ever sized those. There is no way for Preboot to be "full" while the Data volume has room, because there is only one pool of room. ## Why the free-space numbers repeat Because the answer to "how much space is available on this volume?" is really "how much space is left in the container?", every volume in the container answers with the same number: ```bash $ df -h / /System/Volumes/Data Filesystem Size Used Avail Capacity Mounted on /dev/disk3s1s1 460Gi 10Gi 120Gi 8% / /dev/disk3s5 460Gi 330Gi 120Gi 74% /System/Volumes/Data ``` Note the shape of that output: the two volumes disagree wildly about *Used*, because each one knows what its own files occupy, but they agree on *Size* and *Avail*, because those come from the container. Engineers who learned the partition model read this as a bug. It is the design. ## Reserves and quotas Pure sharing is not always what you want — a build volume that fills the container takes the system volume's headroom with it. APFS supports two optional per-volume attributes: a **reserve size**, which guarantees a volume that much space no matter what its neighbours do, and a **quota size**, which caps how much it may ever take. Apple's disk tooling exposes both when you add a volume. Neither is set by default, and neither preallocates or formats anything: they are just constraints handed to the space manager. ## What this replaced Under HFS+ each filesystem lived in its own partition with a size fixed at creation. Giving one more room meant shrinking a neighbour and moving data — slow, and risky if the neighbour had no free tail to give up. Apple's CoreStorage layer softened this for FileVault and Fusion Drives, but the fundamental unit was still a sized partition. APFS moves the sizing decision to allocation time and removes it from the administrator's plate entirely. ## Consequences worth knowing **Free space is a container-wide property, so anything that pins blocks affects everyone.** Snapshots and clones consume container space that no visible file accounts for, and the deficit shows up on every volume at once. **Deleting a volume is instant and returns everything.** There is no repartition step; the volume's blocks simply become free in the container. **Adding a volume is cheap.** Creating a case-sensitive volume for a source tree, or a separate volume for a VM image, costs nothing up front because it starts at effectively zero blocks. This is the standard answer to "I need a case-sensitive filesystem on my Mac but I don't want to reformat." **Volumes can be grouped.** The System and Data volumes on a startup disk form a *volume group* and are presented as a single tree, which is why `/` and `/System/Volumes/Data` look like one filesystem even though `df` lists them separately. ## The one-line version for an interview Partition → container → volumes. The container owns the blocks; the volumes borrow them. Size is an allocation-time outcome, not a formatting decision, and the identical free-space numbers are the direct evidence of that.

  • If space sharing is automatic, why would anyone still set a reserve or a quota on a volume?
    Because sharing has no fairness guarantee. A volume holding VM images or CI artefacts can consume the whole container and leave the system volume unable to write. A reserve guarantees a floor for the volume that must not fail; a quota caps the one you do not trust. Both are hints to the container's space manager and neither preallocates blocks, so they cost nothing when unused.
  • What actually happens when you add a new APFS volume to an existing container?
    Almost nothing on disk. The container writes a new volume superblock and its initial metadata structures; no space is carved out and no neighbouring volume is resized, so the operation is effectively instant and non-destructive. The new volume starts near zero blocks and grows by allocating from the shared pool, which is why creating a case-sensitive scratch volume is a routine move rather than a reformat.
  • Can one APFS container span more than one physical disk?
    Yes — that is exactly how a Fusion Drive works: an SSD and a hard disk are combined into one container whose space manager tiers data between the two devices, and the volumes above see a single pool. It is not a general-purpose RAID substitute, though: the container's integrity depends on every member device being present.

saying these in an interview costs you the question

  • Says each APFS volume is sized when it is created, like a partition
  • Calls the repeated free-space numbers a df reporting bug
  • Claims you must repartition the disk to grow a volume
  • Assumes every APFS volume has a quota by default
  • Believes one volume filling up cannot affect the others

context