5

I want to create a partition with a different filesystem but in order to do that I need to resize my APFS container.

enter image description here

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?

  • I have this same question and have not been able to figure it out either. I tried the same things that you did. Finally ended up just cloning the drive, then erasing it, partitioning it, and then restoring from the clone. If no one comes up with a satisfactory answer to this in a few days, ping me and I’ll offer a bounty. I’d love to figure out if there’s a solution to this when the steps above don’t work. – TJ Luoma Dec 11 '18 at 5:09
  • @TJLuoma I have been thinking about erasing as a solution as well but I really prefer not to, perhaps only as a last resort. You can put up the bounty if you're still interested. – Merlijn Vos Dec 22 '18 at 13:51
  • Yeah, that's a terrible "solution". I hope there's another way. – TJ Luoma Dec 22 '18 at 15:57
  • what shall it do when you resize it ? are you just trying to create separate partition with APFS format or something else ? – Ruskes Dec 23 '18 at 19:00
  • @Buscar웃 as said in the first sentence from my post: "I want to create a partition with a different filesystem but in order to do that I need to resize my APFS container" :) – Merlijn Vos Dec 23 '18 at 21:02
3
+100

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).

  • This is better than anything else I've heard of from checking around, so I'm happy to award the bounty to you, Geoff. Thanks for taking the time to explain it so well. – TJ Luoma Dec 28 '18 at 1:32
  • No problem. APFS is weird. Sorry if it came off as a little harsh; its just I know it is possible, so we just gotta "get there". – Geoff Nixon Dec 28 '18 at 2:16
  • Oh! And make sure you turn APFS defragmentation on. Try it on all the APFS-related partitions/volumes diskutil ap defragment disk0s2 enable, diskutil ap defragment disk1 enable, diskutil ap defragment disk1s1 enable, etc. – Geoff Nixon Dec 28 '18 at 2:20
  • 1
    @GeoffNixon thanks for the elaborate response! It worked for me and this is what I did in detail: 1. Disabled all TM destinations (sudo tmutil removedestination UNIQUE_ID) 2. Defragment all the APFS-related partitions/volumes (as mentioned above) 3. Decrypted my drive 4. optional: removed tons of old files to save space using (over 100GB through Disk Inventory X 5. Restart. – Merlijn Vos Jan 2 at 19:20
  • 1
    @merlijn-vos great to hear it! APFS is a challenge, but ultimately it is a better filesystem. But, there are growing pains. Thank you, it's great to get feedback that answers work for people besides the OP! :) – Geoff Nixon Jan 4 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .