The Shift from Partitions to Volumes
For decades, managing hard drives in macOS (using HFS+) required rigid partitioning. If you had a 1TB hard drive and wanted a separate space for your Final Cut Pro video projects, you created a 500GB partition for the OS and a 500GB partition for the videos. The problem was catastrophic rigidity: if your OS partition filled up, your Mac would crash, even if the video partition was completely empty. Fixing this required destroying the partitions and losing data.
With the introduction of the Apple File System (APFS), rigid partitions were abolished. APFS uses a “Container” architecture. A single 1TB Container sits on the physical drive. Inside that container, you can create dozens of Volumes.
Unlike legacy partitions, APFS Volumes share the same free space. If you create a “Video” volume, it does not reserve 500GB. It takes up 0 bytes. As you add video files, it grows dynamically. If you delete files, it shrinks dynamically.
While this shared space is revolutionary, it introduces a new danger: a runaway application on the “Video” volume could accidentally consume the entire 1TB container, starving the macOS system volume and crashing the computer. To prevent this, system administrators use the diskutil command to enforce strict Quotas and Reservations.
Step 1: Understanding Quotas and Reservations
Because the graphical Disk Utility application obscures advanced APFS features, you must use the terminal.
- Quota: The absolute maximum size a volume is allowed to grow. (e.g., The Video volume is not allowed to exceed 200GB, ensuring 800GB is always left for the OS).
- Reservation: The absolute minimum guaranteed space for a volume. (e.g., The Video volume is guaranteed 50GB of dedicated space that no other volume in the container can ever touch).
Step 2: Identifying the APFS Container
Before you create a new volume, you must identify the exact disk identifier of the parent APFS Container.
diskutil list
Look for the section labeled Synthesized or APFS Container Scheme. You will see an identifier like disk3, which contains your Macintosh HD and Data volumes.
Step 3: Creating a Volume with a Quota (Maximum Limit)
Suppose you want to create a new volume for a developer to compile massive Xcode projects. You want it to share the free space dynamically, but you absolutely forbid it from consuming more than 100GB of the internal SSD.
You use the diskutil apfs addVolume command, targeting the container (disk3), specifying the format (APFS), naming the volume (Xcode_Builds), and applying the -quota flag.
sudo diskutil apfs addVolume disk3 APFS "Xcode_Builds" -quota 100g
macOS instantly creates the volume. It mounts on the desktop. If you click on the volume and press Cmd+I to Get Info, it will report its total capacity as 100GB, completely obscuring the fact that the underlying physical drive is 1TB.
Step 4: Creating a Volume with a Reservation (Guaranteed Space)
Conversely, suppose you are setting up a local Time Machine backup volume on an external 4TB APFS drive, alongside a massive media library. You want to ensure that no matter how many movies the user downloads, Time Machine is mathematically guaranteed at least 500GB of dedicated space to perform its backups.
You use the -reserve flag:
sudo diskutil apfs addVolume disk4 APFS "TimeMachine_Local" -reserve 500g
The moment this command executes, the parent APFS container permanently sets aside 500GB. Even if the TimeMachine_Local volume is currently completely empty, the other volumes in the container will report that their available free space just dropped by 500GB.
Step 5: Combining Quotas and Reservations
The true power of APFS volume management is combining both flags to create a perfectly sandboxed environment.
You can create a “Scratch Disk” volume for Adobe Premiere that is guaranteed exactly 200GB of space so the application always has room to breathe, but is strictly capped at 300GB so it cannot run away and crash the OS.
sudo diskutil apfs addVolume disk3 APFS "Adobe_Scratch" -reserve 200g -quota 300g
Step 6: Resizing and Deleting Volumes
The brilliance of APFS is that if you realize a quota is too restrictive, you do not need to reformat the drive or move data. You can adjust the quota of a live, active volume instantly using the resizeContainer command (which, despite its name, adjusts the volume parameters within the container).
(Note: In macOS Ventura and later, Apple shifted dynamic resizing of active APFS quotas to background disk arbitration, but you can always destroy and recreate empty volumes instantly).
To completely destroy the volume and return its reserved space back to the shared pool, use the deleteVolume command:
sudo diskutil apfs deleteVolume disk3s5
(Where disk3s5 is the specific identifier of the Adobe_Scratch volume).
Conclusion
The APFS Container architecture eliminates the rigid, data-destructive partitioning of the past, introducing fluid, shared storage. By abandoning the graphical interface and utilizing the diskutil command to enforce strict mathematical Quotas and Reservations, Mac administrators can safely isolate aggressive applications, guarantee space for critical backups, and ensure the underlying operating system is never starved of storage.