Trouble restoring hard drive space after deleting bootcamp partition

I have a problem with my Fusion Drive. I created partition for Bootcamp, then deleted it, then something went wrong. I lost 200 GB of space and I have a trouble restoring it, Fusion Drive capacity should be 1.1 TB not 800 GB. Here is my Mac's diskutil list:

iMac-Lukasz:~ lukasz$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk2         121.1 GB   disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                 Apple_APFS Container disk2         678.4 GB   disk1s2
   3:                        EFI NO NAME                 104.9 MB   disk1s3

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +799.6 GB   disk2
                                 Physical Stores disk0s2, disk1s2
   1:                APFS Volume MAC OSX                 309.8 GB   disk2s1
   2:                APFS Volume Preboot                 49.0 MB    disk2s2
   3:                APFS Volume Recovery                510.4 MB   disk2s3
   4:                APFS Volume VM                      6.4 GB     disk2s4
iMac-Lukasz:~ lukasz$ diskutil cs list
No CoreStorage logical volume groups found

enter image description here enter image description here

Any ideas how to restore it to the full size?


Solution 1:

The HDD part of your Fusion Drive contains an alien EFI partition:

3:                        EFI NO NAME                 104.9 MB   disk1s3

This second EFI blocks restoring a full sized container:

  1. Get the details: diskutil list
  2. Remove the NO NAME EFI:

    diskutil eraseVolume "Free Space" %noformat% /dev/diskXsY #replace with the device node of the NO NAME EFI (in your example disk1s3)
    
  3. Get the APFS container reference of the APFS container spanning the two physical drives: diskutil ap list. (In your example disk2)
  4. Resize the container:

    diskutil ap resizeContainer containerReferenceDevice 0
    

    with containerReferenceDevice = disk2 this is:

    diskutil ap resizeContainer disk2 0