APFS Container Disk & APFS Container Scheme Mismatch – Cannot Resize

apfsbootcampdisk-utilityhard drivepartition

I have an issue where I screwed up my partitions by removing a PC formatted partition, and it did not recombine itself with my overall partition. Issue happened because I got a new SSD, loaded my mac stuff, created a 300GB PC partition, and was trying to use WinClone 7 to reload my old bootcamp, but it kept not being bootable. I was able to remove the non-bootable PC partition twice, but the third time I ended up with an issue and was hoping someone could help.

  • When I run 'diskutil list' in recovery mode, in Disk0s2 it shows
    Apple_APFS Container disk1 is 2.0TB, while in Disk1 , it shows APFS
    Container Scheme is 1.7TB (and says its the Physical Store at
    Disk0s2).
  • When I run 'diskutil APFS list', its showing the
    capacity at 1.7TB
  • I've tried resizing being specific to "2.0t"
    and using "0", but it gives me an error either way (with "0" stating
    it can't be the same size)

Anyone have thoughts to recover the 300GB I'm missing, other than completely re-formatting the entire thing? Everything else looks normal besides the mismatch.

Also has anyone else had the same issue with WinClone? I figured maybe I have to use bootcamp assistant to create the partition instead of doing it manually, and then overwrite it with WincClone?

Thanks in advance!!

gpt show

       start        size  index  contents
       0           1         PMBR
       1           1         Pri GPT header
       2          32         Pri GPT table
      34           6         
      40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  409640  4000387680      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  4000797320           7         
  4000797327          32         Sec GPT table
  4000797359           1         Sec GPT header

diskutil list

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         2.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         2.0 TB     disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.7 TB     disk1
                             Physical Store disk0s2
   1:                APFS Volume Macintosh               133.6 GB   disk1s1
   2:                APFS Volume Preboot                 41.4 MB    disk1s2
   3:                APFS Volume Recovery                512.3 MB   disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4

diskutil apfs list

APFS Container (1 found)
|
+-- Container disk1 C7855526-CCEF-4FBC-9397-B560C8AA2D33
    ====================================================
    APFS Container Reference:     disk1
    Size (Capacity Ceiling):      1748316786688 B (1.7 TB)
    Capacity In Use By Volumes:   136617209856 B (136.6 GB) (7.8% used)
    Capacity Not Allocated:       1611699576832 B (1.6 TB) (92.2% free)
    |
    +-< Physical Store disk0s2 681FC29B-F4C1-481D-9112-10194930CA55
    |   -----------------------------------------------------------
    |   APFS Physical Store Disk:   disk0s2
    |   Size:                       2048198492160 B (2.0 TB)
    |
    +-> Volume disk1s1 A91EA382-7624-4E09-8D48-2FFF6AB12700
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s1 (No specific role)
    |   Name:                      Macintosh (Case-insensitive)
    |   Mount Point:               /
    |   Capacity Consumed:         133638852608 B (133.6 GB)
    |   FileVault:                 No
    |
    +-> Volume disk1s2 2CF27193-404B-44CC-B33B-FFF867164EF9
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s2 (Preboot)
    |   Name:                      Preboot (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         41385984 B (41.4 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s3 52F3B2B8-A140-4EB6-9F9D-04D18AE8A045
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s3 (Recovery)
    |   Name:                      Recovery (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         512319488 B (512.3 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s4 8C075D10-42E3-4BE5-9FFC-AB2709A73909
        ---------------------------------------------------
        APFS Volume Disk (Role):   disk1s4 (VM)
        Name:                      VM (Case-insensitive)
        Mount Point:               /private/var/vm
        Capacity Consumed:         2147504128 B (2.1 GB)
        FileVault:                 No

Resize Attempts:

MacBook-Air:~ XXXX$ diskutil apfs resizeContainer disk1 0
Started APFS operation
Error: -69743: The new size must be different than the existing size
MacBook-Air:~ XXXX$ diskutil apfs resizeContainer disk1 2.0t
Started APFS operation
Aligning grow delta to 251,683,213,312 bytes and targeting a new physical store size of 2,299,881,705,472 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 2,048,198,492,160 bytes
Error: -69519: The target disk is too small for this operation, or a gap is required in your partition map which is missing or too small, which is often caused by an attempt to grow a partition beyond the beginning of another partition or beyond the end of partition map usable space

.

Best Answer

If you make the container smaller, then the mismatch will go away. For example, use the command given below.

diskutil apfs resizeContainer disk0s2 1.6t

Afterwards, you can enter the command given below to resize to 2.0 TB.

diskutil apfs resizeContainer disk0s2 0