Apple’s PCIe SSDs have always proven challenging for data recovery. We have a good success rate with them, however many of our tools don’t even support working at PCI level. This particular SSD provided a new challenge though.
The SSD we received was initially showing up correctly in the system. Upon access, the disk would read a few bytes and then stop reading. The SSD would remain visible to the system but not respond to any further commands. The only way to bring it back was to cycle power. Yep, the IT classic — Turn it off and on again! The problem is, PCI cards don’t come with on-off switches so the solution needed to work within software.
First I thought a copy task with a scheduled reboot may get the device back online, however I quickly found out PCI slots stay powered on during a reboot 🤦♀️ This means once the device gets stuck, a reboot won’t bring it back on.
My second idea was to schedule shutdowns but the time taken to boot and then restart the copy process seemed like a nightmare.
In the end I found a series of commands which could keep a fairly steady copy process going. The main idea was:
- Start a copy task
- Pause on error
- Toggle the PCI connection using low-level commands
- Resume the copy task
- Rinse & repeat
Although not the most elegant solution, this process cycled through 647 times, taking an average of 760MB per cycle. In less than 24 hours the whole 512GB device was cloned to another disk ready for recovery.
After this script finished I did find a slightly cleaner way to reset the PCI slot which will result in much faster recoveries in the future.
I was unable to find any mention of this type of recovery online, so if anyone else knows about it, they’re keeping it to themselves. If you know anyone with a failed Mac SSD, get in touch. This is just one of the many solutions we have for recovering them.