In macOS 11 Big Sur, Apple added APFS support for Time Machine volumes. APFS has some outstanding features for backup purposes such as snapshot cloning, volumes sharing space in a container, space reservations and quotas, and improved space sharing/linking. However, Time Machine is a hog and wants to use all of the drive.
In order to carve out a piece of your external drive for Time Machine and impose a storage quota without actually creating a separate volume, you're going to have to do some hoop jumping and some Terminal commands. Here's how you do it
In Disk Utility.app, do the following:
- Format your external disk for APFS using the whole disk (6TB in my situation)
- Create a new APFS volume to the container
- When creating the second volume, set the format to
APFS (Case-sensitive, Encrypted)
and set a password for the encrypted volume - Click the Size Option button and set the quota you want the volume to use (1TB in my situation). Leave Reserve Size blank.
- Click the Add button. Disk Utility will create the drive volume and mount it
- At the terminal, use
diskutil apfs list
to identify the device name for your Time Machine volume. Mine wasdisk5s2
:
+-> Volume disk5s2 22222222-FFFF-CCCC-AAAA-111111111111
---------------------------------------------------
APFS Volume Disk (Role): disk5s2 (No specific role)
Name: Time Machine (Case-sensitive)
Mount Point: /Volumes/Time Machine
Capacity Consumed: 987136 B (987.1 KB)
Capacity Reserve: None
Capacity Quota: 1000000000000 B (1000.0 GB) (0.0% reached)
Sealed: No
FileVault: Yes (Unlocked)
See the "No specific role?" That's the special sauce. APFS supports assigning roles to volumes, and we need to set the Backup role on our drive:
diskutil apfs changeVolumeRole disk5s2 T
After running that command, diskutil apfs list
will now show the role as Backup.
- Go into the Time Machine System Preferences pane and point to your new drive. Enable encryption and enter the same password you used when creating the encrypted volume.
Time Machine should use the drive as-is without deleting and re-creating the volume (and losing your quota setting)
+-> Volume disk5s2 22222222-FFFF-CCCC-AAAA-111111111111
---------------------------------------------------
APFS Volume Disk (Role): disk5s2 (Backup)
Name: Time Machine (Case-sensitive)
Mount Point: /Volumes/Time Machine
Capacity Consumed: 138425548800 B (138.4 GB)
Capacity Reserve: None
Capacity Quota: 1000000000000 B (1000.0 GB) (13.8% reached)
Sealed: No
FileVault: Yes (Unlocked)
Hope that helps you out!