0

Question renamed from: « Diagnosing what's going wrong with the fusion drive of an iMac 27'' 2019 A2115 EMC 3194 » after the origin of the problem could be located.

Having a non-booting iMac using fusion drive, with a 32GB SSD and 1TB HDD, I would like attempt restoring it without loosing the data. I can still start the iMac in recovery mode and issue commands through the terminal.

I did two external clones of both the SSD and HDD. There were no errors during the cloning. Furthermore the sha1 /dev/... command confirmed identical SHA1 hashes for the original disks and their clones. So, I can restore the situation by cloning in the other direction if necessary.

-bash-3.2# diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         28.0 GB    disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk3         27.7 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 disk3 1000.0 GB disk1s2

/dev/disk2 (disk image): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme +2.1 GB disk2 1: Apple_HFS macOS Base System 2.0 GB disk2s1

/dev/disk3 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +1.0 TB disk3 Physical Stores disk0s2, disk1s2 1: APFS Volume Preboot 185.9 MB disk3s2 2: APFS Volume Recovery 510.6 MB disk3s3 3: APFS Volume VM 2.1 GB disk3s4

(...)

diskutil verifyDisk /dev/disk1 reveals that the problem comes from the EFI partition on the mechanical hard drive:
This first problem could be corrected. See "Edit" section below.

-bash-3.2# diskutil verifyDisk /dev/disk1
Started partition map verification on disk1
Checking prerequisites
Checking the partition list
Checking the partition map size
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Problems were found with the partition map which might prevent booting
Error: -69766: The partition map needs to be repaired because there's a problem with the EFI system partition's file system
Underlying error: 8

I assume that I should destroy the GPT of the HDD and create it again, or at least modify it. In David Anderson's answer here, one can see how to remove GPT entries and create ones. But I am not sure if I should create again the GPT of the HDD with the same values or if some have to be corrected.

Here's the output of gpt -r show disk1 for the HDD:

gpt -r show disk1
       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  1953115488      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  1953525128           7         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

Edit

I deleted the EFI partition and created it again. diskutil info disk1s1 (and made screenshot of partition info) diskutil umountDisk disk1 (unecessary, but just to be sure)

gpt remove -i 1 /dev/disk1
gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk1
gpt -r show disk1  (verify gpt table)
diskutil info disk1s1  (verify that the partition is still FAT32 and EFI
diskutil verifyDisk /dev/disk1  (verify partition map on disk1)

The partition map is now OK for disk1.

The verification fails on the verification of the volume, on disk0s2:

error: fusion_mid_tree: btn: invalid o_oid (0x0) 
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
Underlying error: 8

When calling diskutil resetFusion (the iMac seems using Mojave), only the rotational disk (HDD) is detected:

diskutil resetFusion

Internally-located hardware disk device known to the currently-running macOS: Rotational (disk1)

Volumes exported by partitions or storage systems hosted on the above device:

Your computer must have exactly 1 solid-state and 1 rotational disk drive.

In summary, the problem seems coming from the fact that although the SSD is listed by diskutil, it is is ignored for the fusion drive. So, the question is how to repair the fusion data structures?


OuzoPower
  • 405
  • In your case, disk2, disk4 and disks with numbers greater than 4 appeared because you booted to macOS Recovery. When booted to macOS, the content (volumes) represented by these disk identifiers will not be present. You should not attempt to verify or repair these disks. – David Anderson May 17 '23 at 20:32
  • The command diskutil verifydisk /dev/disk3 is the wrong one to use. You should use diskutil verifyvolume /dev/disk3 instead. You will probably get the same results as when you ran First Aid on Container disk3 in the Disk Utility. Note: The Disk Utility will show more information if you select "Show All Devices" from the "View" menu. – David Anderson May 17 '23 at 20:59
  • Thank you David and sorry for the late answer. I could further diagnose what was going wrong and it seems related to the GPT partitioning scheme on the HDD, with problems in the EFI that prevent boot. Accordingly, I completely rewrote the question. If I can create again (or fix) the GPT table and the EFI partition for the HDD, it could possibly restore the iMac. The Mac is with Mojave. I remember that diskutil resetFusion was listing the SSD but not the HDD. – OuzoPower Jun 03 '23 at 11:36
  • Can you confirm whether you have a backup or not? – benwiggy Jun 03 '23 at 11:57
  • I have two clones of each of the two drives, so that I can restore everything, but I have no TimeMachine backup if this is the question. – OuzoPower Jun 05 '23 at 06:16
  • Essentially, I'm asking whether just wiping and resetting, then restoring your data would be easier. Are these clones viable backups of the data, or are they just clones of each part of the Fusion drive, which must themselves be 'fused'? – benwiggy Jun 05 '23 at 09:18
  • Clones are of each part of the Fusion drive, as explained at paragraph 2. UFS Explorer RAID Recovery and Professional editions both easily give access to the 'fused' data. I also ran full scan with another data recovery software on each drive independantly. Data from the user account, as found on the SSD, is a little less than 6GB. I assume that all the user data are on the SSD as I could not find user data on the HDD, but I will have to compare the file names found by my software with those found by UFS Explorer (trial) to be sure. I am also thinking about resetting, copying and importing. – OuzoPower Jun 06 '23 at 07:40
  • Not sure if wiping will be necessary in this case. I will try first without wiping and see. Restoring the fusion drive would have been my favourite solution, to be sure that everything is here and that I'm not forgetting anything to import (picture libaries, bookmarks, mails). But restoring the fusion drive seems difficult. I hope everything is on the SSD to avoid the expense of an UFS EXplorer license. – OuzoPower Jun 06 '23 at 07:45

0 Answers0