How to convert FusionDrive to APFS

apfsdisk-utilitymojave

Backstory: Installation of MacOS Mojava failed on my late '12 iMac with exception: com.apple.DiskManagement error -69854. I can find few other questions with this problem, but the general consent is, that the problem comes from Mojave trying to convert the FusionDrive to APFS. I tried the installation two times, I do have a TimeCapsule backup as welll as a USB with bootable Mojave and am ready to try things out. What I thought would be smart to do is to convert the FusionDrive to APFS before attempting to upgrade the OS.

I see two possibilities: do it via DiskUtility, or from Terminal with diskutil. The first option does not work as the menu entry is greyed out, if I try from High Sierra as well as from the Mojave USB stick. Running diskutil list lists three disks:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.1 MB   disk0s3

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:          Apple_CoreStorage Macintosh HD            121.0 GB   disk1s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk1s3

/dev/disk2 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +1.1 TB     disk2
                                 Logical Volume on disk1s2, disk0s2
                                 {some id I am not sure if better hidden}
                                 Unencrypted Fusion Drive

TLDR; which one of the drives do I have to convert to APFS and how?

Best Answer

Well, my experiments have found an end, here are my ideas: the origin of the error -69854 seems to be that there is not enough storage space.

After another failed attempt installing MacOS Mojave from the USB, I went into the local Recovery Mode, before downgrading, and see: "Convert to APFS" in DiskUtility was not greyed out. It failed, as expected, with the -69854 error. When booting from the USB, the option there was clickable too, but leading to the same error. After moving and deleting some stuff to make more free storage space on Macintosh HD, the "Convert to APFS option" suceeded! Afterwards, installation of Mojave from the USB suceeded too.

But to answer the rest of my question, after some more research:

To convert to apfs: diskutil apfs convert <Name of the Disk>. The correct disk seems to be – in my case – /dev/disk2 according to the Details of the DiskUtility. DiskUtility itself uses /sbin/apfs_hfs_convert – use man apfs_hfs_convert in Terminal if you want to learn more about that one.