200GB unused, but can't change APFS container size due to minimum requirement
I want to create a partition with a different filesystem but in order to do that I need to resize my APFS container.
This container has 292,4 GB used space. Its minimum size is 500,07 GB. This container cannot be split because the resulting containers would be too small.
What I tried
From "How to Resize Your APFS Container on macOS High Sierra"
diskutil list
Output:
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 500.1 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +500.1 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 288.3 GB disk1s1
2: APFS Volume Preboot 43.9 MB disk1s2
3: APFS Volume Recovery 512.3 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +1.9 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Time Machine Backups 1.9 TB disk2s2
Then:
sudo diskutil apfs resizeContainer disk0s2 450g
Or:
sudo diskutil apfs resizeContainer disk0s2 450g jhfs+ Extra 50g
Output:
Aligning shrink delta to 50.068.037.632 bytes and targeting a new physical store size of 449.999.998.976 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 500.068.036.608 bytes
Error: -69521: Your APFS Container resize request is below the APFS-system-imposed minimal container size (perhaps caused by APFS Snapshot usage by Time Machine)
(perhaps caused by APFS Snapshot usage by Time Machine)
I have removed all local time machine snapshots but I am still getting the same output.
How do I change a APFS container's minimum size?
Solution 1:
Again, yes, you have deleted all the local snapshots. But you clearly have an external Time Machine drive. And Time Machine snapshots (local or remote) place certain requirements on the source drive.
From man tmutil
:
BACKUP STRUCTURE
Throughout this manual, specific language is used to describe particular
"realms" associated with Time Machine backups. It is important to under-
stand this terminology to make effective use of tmutil and its manual.
backup source
A volume currently being backed up by Time Machine.
backup disk
The HFS+ volume that contains Time Machine backups.
backup destination
In the case of a local destination, a synonym for backup disk.
For network destinations, this is the AFP or SMB share on which
the backup disk image resides.
backup disk image (or backup image)
A sparsebundle that, when mounted, is the backing store for a
volume that is a backup disk.
backup store
The top-level "Backups.backupdb" directory at the root of a
backup disk. E.g.,
/Volumes/Chronoton/Backups.backupdb
machine directory
A directory inside a backup store that contains all the backups
for a particular computer. For local destinations, a backup store
can contain multiple machine directories, all for separate com-
puters. E.g.,
/Volumes/Chronoton/Backups.backupdb/thermopylae
--
Remember the error?
E.g., (perhaps caused by APFS Snapshot usage by Time Machine)?
Read this one:
snapshot
A directory inside a machine directory that represents a single
initial or incremental backup of one computer. The word "snap-
shot", in most contexts, is a generic term and is not to be con-
fused with a "local Time Machine snapshot", which is simply a
snapshot stored locally on the computer. E.g.,
/Volumes/Chronoton/Backups.backupdb/thermopylae/2011-07-03-123456
snapshot volume
A directory inside a snapshot that represents a single initial or
incremental backup of one backup source. E.g.,
/Volumes/Chronoton/Backups.backupdb/thermopy-
lae/2011-07-03-123456/Mac HD
VERBS
Each verb is listed with its description and individual arguments.
destinationinfo [-X]
Print information about destinations currently configured for use
with Time Machine. For each backup destination, the following
information may be displayed:
with Time Machine. For each backup destination, the following
information may be displayed:
Name The volume label as shown in Finder.
Kind Whether the destination is locally attached
storage or a network device.
URL In the case of a network destination, the URL
used for Time Machine configuration.
Mount Point If the volume is currently mounted, the path in
the file system at which it was mounted.
ID The unique identifier for the destination.
When more than one destination is configured, the most recent
backup destination will be marked with the > indicator.
When the -X option is provided, output will be printed in XML
property list format.
removedestination identifier
Remove the destination with the specified unique identifier from
the Time Machine configuration. Requires root privileges.
To obtain the unique identifier for a destination, see
destinationinfo.
A. The error:
Error: -69521: Your APFS Container resize request is below the APFS-system-imposed minimal container size (perhaps caused by APFS Snapshot usage by Time Machine)
B. Your response:
I have removed all local time machine snapshots but I am still getting the same output.
C. The documentation:
The word "snapshot", in most contexts, is a generic term and is not to be confused with a "local Time Machine snapshot".
Capisce?
Yes, you have deleted all your local snapshots. But you also have another backup drive. In the example you linked, there was no such drive.
You need to remove all Time Machine backups stores, disable all destinations, etc. You can reassociate your backups later. But following this, you should be fine; worst case, decrypt your drive too (APFS encryption is complicated and has a lot of overhead due to the drive-key/user-key system).
Solution 2:
If you are shrink you main volume, open 'Boot Camp Assistant', click 'Continue' and it will be stuck for a while and go error. Then quit it and you should be able to shrink.
I think it was doing some reclamation, but I don't know if there is a more direct method.