1

I done a mistake playing with bootcamp.

I create a small Windows partition 72GB, with bootcamp. But I realized that was too small, so I decided to deleted it with Disk Utility (I know.. WRONG choice).

So I create a new windows partition (with bootcamp too) larger approx.200GB, to try to delete the first one. After that I used bootcamp to delete windows partition. But that deleted just the last one (the big one).

So I tried this How to remove a container disk and reclaim space with main partition? To delete the two partitions.

I done some stupid thinks because now I have 472GB unusable.

Is Anyone now how to transform this "freespace" to merge it to my Machkintosh HD main partition. For formation I have and iMac 2014 with fusion drive.

Thanks a lot

disk util list

Disk util partition reparition

Disk util merge process failed NB : I done it in recovery mode without success.

Update 1

Hello and thanks David for thoses precises explainations.

I do what you ask :

  • I create the new MyBackup partition
  • After I a create a bootable usb flash drive and start a terminal on it
  • I have an error during the repair volume command as you predict

So i do : diskutil apfs deletecontainer disk1s2 Dummy

But I'm not sure to have what you explain. I haven't disk0s2

So I prefered to post you the diskutil list to be sure what I have to do next.

Diskutil list

Thanks again !

1

The command below will verify the container before resizing. In your case, the verification failed, so the resize operation did not take place.

diskutil apfs resizecontainer disk1s2 0

You could try repairing the container. Before attempting, I would recommend backing up your personal files. Backing up to a external drive would be best. However, since you have free space, you could enter the command below to create a another APFS container with the APFS volume MyBackup. This answer assumes will have done this.

diskutil addpartition disk1s2 apfs MyBackup 0

At this point, you should boot to macOS Big Sur Internet Recovery. Or, you could boot from a macOS Big Sur installer flash drive.

Note: You should check to see if any of the identifiers have changed. If so, then make the appropriate substitutions in the remaining commands.

The command below attempts repair.

diskutil repairVolume disk1s2

If repair fails, then you should reinstall macOS BigSur. Below are the commands needed to create a new APFS container with the single APFS volume Macintosh HD. The command given below attempts to delete the APFS Fusion container.

diskutil apfs deletecontainer disk1s2 Dummy

If the above command fails to create an Apple_HFS type partition on both disk0s2 and disk1s2, then enter the command given below.

diskutil apfs deletecontainer -force disk1s2 Dummy

The above command will generate the following warning.

Deleting APFS Container with all of its APFS Volumes
Operating in the contingency (damaged APFS Container) mode. Only the specified APFS Physical Store disk is guaranteed to be reclaimed. Other APFS Physical Stores which may have defined this APFS Container might need to be reclaimed separately
Deleting Container

When I tested this command, an Apple_KFS type partition was created on both disk0s2 and disk1s2. If this does not happen, then stop and post the output from diskutil list to your question. Post a command to this answer, so I can be informed.

The next command creates a new APFS Fusion container.

diskutil apfs createcontainer -main disk0s2 -secondary disk1s2

The next command outputs the identifier for the new APFS Fusion container. Here I will assume the identifier disk2 was output.

diskutil info disk0s2 | grep Container

The next command adds an APFS volume labeled Macintosh HD to the new APFS Fusion container. If your identifier for the new APFS Fusion container is not disk2, then make the appropriate substitution.

diskutil apfs addvolume disk2 apfs "Macintosh HD"

At this point, you can install macOS Big Sur and copy your backed up files back to the Macintosh HD volume.

If you created the MyBackup volume, then enter the following commands to remove the APFS container with this volume and reclaim the space.

diskutil apfs deletecontainer disk1s3
diskutil apfs resizecontainer disk1s2 0

Update 1

Below is a copy of the image you posted of your progress.

You entered the command given below.

diskutil apfs deletecontainer disk1s2

You were suppose to enter the command given below.

diskutil apfs deletecontainer disk1s2 Dummy

You can fix this error by entering the commands given below.

diskutil addpartition disk0s1 jhfs+ "Dummy 2⁩" 0 
diskutil addpartition disk1s1 jhfs+ "Dummy" 0

To insure the identifiers are assigned correctly, you probably should restart the Mac after entering the above commands. In your case, you will want to boot from the flash drive. Since you have successfully removed the defective APFS Fusion container, you can continue with the original instructions at the point where you will be entering the command which creates a new APFS Fusion container.

4
  • Thanks, for your answer but like I said, I'followed the previous link and do this command. That doesn't work. .... Checking the Fusion data structures error: fusion middle tree: invalid "from" range 0x400000880f194:1 Fusion data structures are invalid The volume /dev/disk0s2 could not be verified completely Storage system check exit code is 8 Error: -69716: Storage system verify or repair failed May 16 at 21:12
  • Franck_Cordu: Sorry, I should have done a better job reading your question. I updated my answer. May 17 at 1:33
  • A little comment to have a bit more help. Thanks again. May 18 at 19:45
  • Hello David, thank you so much it works perfectly fine. I juste have to install MacOs and restore my time machine backup. Thanks again ! May 19 at 18:47
1

If you see this link : https://support.apple.com/en-us/HT207584. the command diskutil resetfusion would repair your system disks structure.

0

Hello and thanks David for thoses precises explainations.

I do what you ask :

  • I create the new MyBackup partition
  • After I a create a bootable usb flash drive and start a terminal on it
  • I have an error during the repair volume command as you predict

So i do : diskutil apfs deletecontainer disk1s2 Dummy

But I'm not sure to have what you explain. I haven't disk0s2

So I prefered to post you the diskutil list to be sure what I have to do next.

Diskutil list

Thanks again !

6
  • The image you posted shows you entered the command diskutil apfs deletecontainer disk1s2, but in your text you state entering the command diskutil apfs deletecontainer disk1s2 Dummy. The instruction to fix this error have been added to the end of my answer. See the section titled "Update 1". May 19 at 5:44
  • If you see this link support.apple.com/en-us/HT207584 the command diskutil resetfusion would repair your system disks structure.
    – Jean_JD
    May 19 at 6:28
  • @Jean_JD: From my understanding, entering the command diskutil resetfusion would destroy the MyBackup volume. According to my instructions, this volume was suppose to contain any data the OP wanted to save. I do not know if the OP actually saved any data to this volume, since the OP had a time machine backup. May 20 at 2:12
  • @David In the container disk3 there is no data (840 kb) and the install key disk4 have not a valid partition scheme (guid is required for a boot disk).
    – Jean_JD
    May 20 at 5:58
  • 1
    @David OK, I do that. ;-)
    – Jean_JD
    May 20 at 15:43

You must log in to answer this question.

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