Apple Fusion Drives and what to image

Post Reply
tripleman
Posts: 4
Joined: Sat Feb 08, 2020 9:43 pm

Apple Fusion Drives and what to image

Post by tripleman »

I have an iMac with a Fusion Drive, with only one partition on it, that is having severe problems.

I've read the documentation and I can't really find if it's better to try to image a device or a partition and whether it matters if the (failing) drive that I want to image is an Apple Fusion Drive since they are a little strange in that the OS sees the SSD and HD as basically one drive if I understand things correctly.

In the end, I'd like to be able to use Migration Assistant to be able to restore, from this image, my files, apps and settings to my iMac once Apple has repaired or replaced the iMac.
tripleman
Posts: 4
Joined: Sat Feb 08, 2020 9:43 pm

Re: Apple Fusion Drives and what to image

Post by tripleman »

So, to answer my own question, I imaged the data (HD) partition. There were 0 problems, 0 unreadable sectors but, when I went to mount the image, DDRescue-GUI was unable to mount it, saying that the file system was damaged.

This is not so surprising to me as the SSD portion of a Fusion Drive has the directory.

So, I then imaged the entire device (2TB) to a file on a larger (5TB) external drive as I don't have an empty 2TB drive here. Happily, this also came back with 0 problems and 0 unreadable sectors. But, when I tried to mount the drive with DDRescue-GUI, the external drive spontaneously ejected itself. Not wanting to risk loss of the data on that drive (including the recovery image of the Fusion Drive). I have not tried to mount it again.

I assume the mounting issue lies with the fact that the image is of a Fusion Drive and this somehow confuses the OS. One solution is for me to purchase another external drive and try to restore the image to it, but I'm not sure if that would work. Of course, I'd like to have an idea that it might work before I go out and buy another drive. Any information about how I can solve this issue would be very helpful.
hamishmb
Site Admin
Posts: 59
Joined: Sun Oct 28, 2018 10:47 am
Contact:

Re: Apple Fusion Drives and what to image

Post by hamishmb »

This is strange, I've not heard of this happening before. Unfortunately I don't have experience using Fusion drives, but I think your understanding is right. I'm not sure why the external drive would unmount/eject itself. I would see if you can perform a filesystem check on your image. This can be done using a terminal. First you'd need to attach your image:

Code: Select all

sudo hdiutil attach </path/to/image>
This should tell you the name of the disk. Then you should be able to run fsck_hfs on it (assuming this is an HFS+ drive). There are some instructions for this here: https://www.maketecheasier.com/repair-m ... with-fsck/. You should be able to skip rebooting as this isn't the disk macOS is running from that you're checking.
hamishmb
Site Admin
Posts: 59
Joined: Sun Oct 28, 2018 10:47 am
Contact:

Re: Apple Fusion Drives and what to image

Post by hamishmb »

Imaging just the data partition should have worked just fine. Sounds like it could be a corrupted filesystem to me though.
tripleman
Posts: 4
Joined: Sat Feb 08, 2020 9:43 pm

Re: Apple Fusion Drives and what to image

Post by tripleman »

Thanks for your reply.

I'm trying to image the HD portion of a Fusion Drive because the SSD portion has failed.

I used DDRescue-GUI to create an image of Disk0. I left the house while it was running. When I returned and woke my computer I was presented with this message from DDRescue-GUI:

Code: Select all

Recovery was aborted by user.
However, I looked at the map file and it looks fine, saying it finished:

Code: Select all

# Mapfile. Created by GNU ddrescue version 1.24
# Command line: /Applications/DDRescue_GUI.app/Contents/Resources/ddrescue -v -f -s 2000398934016 -r 0 -c 256 -b 512 /dev/rdisk0 /dev/disk1 /Users/icemo/Desktop/disk0.log
# Start time:   2020-02-28 00:04:10
# Current time: 2020-02-28 17:18:02
# Finished
# current_pos  current_status  current_pass
0x1D1C1100000     +               1
#      pos        size  status
0x00000000  0x1D1C1116000  +
0x1D1C1116000  0x7FFFFE2E3EEE9FFF  ?
There is also the log, and it has a bit of a mixed message. Both

Code: Select all

ddrescue finished recovering data. Telling MainWindow and exiting...
and

Code: Select all

Recovery was aborted by user.
:

Code: Select all

28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: GNU ddrescue 1.24
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - INFO: MainBackendThread().Processline(): Got Initial Status. Setting up the progressbar...
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().set_progress_bar_range(): Setting range 2000 for self.progress_bar...
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message:     Starting positions: infile = 0 B,  outfile = 0 B
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - WARNING: MainBackendThread(): Unexpected error parsing ddrescue's output! Can happen once on newer versions of ddrescue (1.22+) in normal operation. Are you running a newer/older version of ddrescue than we support?
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message:     Copy block size: 256 sectors       Initial skip size: 128 sectors
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Sector size: 512 Bytes
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - WARNING: MainBackendThread().calculate_time_remaining(): Attempted to divide by zero! Returning 'Unknown'
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Press Ctrl-C to interrupt
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Initial status (read from mapfile)
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: (sizes limited to domain 0 B to 2000398934016 B of 9223372036854775807 B)
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Current status
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message:      
28/02/2020 12:04:12 AM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Copying non-tried blocks... Pass 1 (forwards)     
28/02/2020 05:18:02 PM - DDRescue-GUI 2.0.2 - DEBUG: MainWindow().update_status_bar(): New status bar message: Finished                                     
28/02/2020 05:18:02 PM - DDRescue-GUI 2.0.2 - INFO: MainBackendThread(): ddrescue finished recovering data. Telling MainWindow and exiting...
28/02/2020 05:18:02 PM - DDRescue-GUI 2.0.2 - INFO: MainWindow().on_recovery_ended(): ddrescue was aborted by the user...
28/02/2020 05:18:02 PM - Tools.tools - DEBUG: start_process(): Starting process: /Applications/DDRescue_GUI.app/Contents/Resources/other/terminal-notifier.app/Contents/MacOS/terminal-notifier -title DDRescue-GUI -message Recovery was aborted by user. -sender org.pythonmac.unspecified.DDRescue-GUI -group DDRescue-GUI
28/02/2020 05:18:02 PM - Tools.tools - DEBUG: start_process(): Process: /Applications/DDRescue_GUI.app/Contents/Resources/other/terminal-notifier.app/Contents/MacOS/terminal-notifier -title DDRescue-GUI -message Recovery was aborted by user. -sender org.pythonmac.unspecified.DDRescue-GUI -group DDRescue-GUI: Return Value: 0, output: "

* Removing previously sent notification, which was sent on: 2020-02-27 23:04:09 +0000"

28/02/2020 07:28:20 PM - DDRescue-GUI 2.0.2 - DEBUG: FinishedWindow().__init__(): Creating buttons...
28/02/2020 07:28:20 PM - DDRescue-GUI 2.0.2 - DEBUG: FinishedWindow().__init__(): Creating text...
28/02/2020 07:28:20 PM - DDRescue-GUI 2.0.2 - DEBUG: FinishedWindow().__init__(): Setting up sizers...
28/02/2020 07:28:20 PM - DDRescue-GUI 2.0.2 - DEBUG: FinishedWindow().__init__(): Binding events...
28/02/2020 07:28:20 PM - DDRescue-GUI 2.0.2 - INFO: FinishedWindow().__init__(): Ready. Waiting for events...
28/02/2020 07:28:42 PM - DDRescue-GUI 2.0.2 - INFO: FinishedWindow().on_exit(): Closing FinishedWindow() and calling self.parent.on_exit()...
28/02/2020 07:28:42 PM - DDRescue-GUI 2.0.2 - INFO: MainWindow().on_exit(): Preparing to exit...
28/02/2020 07:28:42 PM - DDRescue-GUI 2.0.2 - INFO: MainWindow().on_exit(): Double-checking the exit attempt with the user...
28/02/2020 07:28:48 PM - DDRescue-GUI 2.0.2 - INFO: MainWindow().on_exit(): Exiting...
28/02/2020 07:29:09 PM - Tools.tools - DEBUG: start_process(): Starting process: cp /tmp/ddrescue-gui.log /Users/icemo/Desktop/unsure.log
I think that it completed successfully and that the abort message was in error. But, for confirmation, I tried:

Code: Select all

icemo:~ icemo$ sudo gpt show disk0
Password:
       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  3906619488      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  3907029128           7         
  3907029135          32         Sec GPT table
  3907029167           1         Sec GPT header
  
  icemo:~ icemo$ sudo gpt show disk3
       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  3906619488      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  3907029128  5860446039         
  9767475167          32         Sec GPT table
  9767475199           1         Sec GPT header
  
Now, disk3 is supposed to be a clone of disk0, shouldn't those values match? I am left wondering if I have an exact clone or not—a clone that will give me the best chance of recovering as much data as possible.

Thanks for your time and efforts on this issue. I like DDRescue_GUI and it has certainly made things easier for me in this process.
hamishmb
Site Admin
Posts: 59
Joined: Sun Oct 28, 2018 10:47 am
Contact:

Re: Apple Fusion Drives and what to image

Post by hamishmb »

That sounds like a bug I fixed in the upcoming version (https://bugs.launchpad.net/ddrescue-gui/+bug/1852598) - I think your drive was recovered okay.

They seem to almost match, with the exception of the final chunk of free space before the secondary GPT stuff, which is always at the end of the disk. Is your destination drive a bit larger? That would explain the difference.
hamishmb
Site Admin
Posts: 59
Joined: Sun Oct 28, 2018 10:47 am
Contact:

Re: Apple Fusion Drives and what to image

Post by hamishmb »

Still a bit strange, but my guess is the drive already had a partition table (and hence the GPT backups), before you recovered from the smaller disk, so the old backups stayed there. Does that sound right?
tripleman
Posts: 4
Joined: Sat Feb 08, 2020 9:43 pm

Re: Apple Fusion Drives and what to image

Post by tripleman »

Thanks for your replies. You are correct that the destination drive is larger than the source drive (5 TB as opposed to 2 TB).

Thanks for fixing that bug, it seems it was the cause of the message I was receiving.

In the end, I ran a few of the free, trial versions of programs that recover data (they show you what they can find for free. To recover the files, you have to pay) and it didn't seem like they did much more than the free PhotoRec, so I used that. It worked well but there is no structure to what is found and none of the files have their original files names. A bit of a mess but, better than nothing.
hamishmb
Site Admin
Posts: 59
Joined: Sun Oct 28, 2018 10:47 am
Contact:

Re: Apple Fusion Drives and what to image

Post by hamishmb »

Ah excellent.

Yeah, that is unfortunate, but there's usually nothing that can be done about it, sadly. You might be able to sort by file type with commands like:

Code: Select all

mkdir doc && mv -v *.doc ./doc/
To make your life a bit easier, but I imagine you probably already know that. Hopefully must of the files are intact :)
Post Reply