DRAT and macOS Monterey

Earlier this week, a third party NVMe SSD failed as the boot drive inside my MacBookPro11,4. The drive had been backed up less than 8 hours from the disaster, but I was hoping to fiddle with the failed drive a bit more to recover files on the desktop that were saved within the last 8 hours.

Jivan Pal and others have developed DRAT for macOS and linux to work with APFS drives that might have some sort of corruption (I’m assuming this is extremely rare). Immediately after the failure, the SSD drive wasn’t visible in Finder or Disk Utility and obviously wouldn’t mount. After employing the power cycle method using an USB enclosure the NVMe was suddenly viewable in Disk Utility, but still couldn’t be mounted.

And that’s when I came across Jivan Pal talking about his open-source software, DRAT. My NVMe SSD is throwing error messages that mention the Space Manager is invalid. I’m not sure DRAT will help with this issue, but I figured it was worth a shot before I sent the SSD away on warranty for a replacement.

To install DRAT, you’ll need to visit this site, find the highest number for the latest version, click the triangle next to “Assets”, and if you’re on a Mac click on the file name “drat-0.1.3-darwin-amd64” or whatever the number is that corresponds to the version you’re seeing when reading this.

When the file is downloaded place it in the /Applications/Utilities folder, then open Terminal.app to execute these two lines of code:

cd /Applications/Utilities
chmod +x drat-0.1.3-darwin-amd64
./drat-0.1.3-darwin-amd64

When you execute the code with the last line of code, move back to Finder and offer access to this app in your Security settings, Apple logo->System Preferences…/Security & Privacy->General tab, and click “Allow Anyway”.

As suspected, the NVMe SSD is too far gone as back in Terminal.app and a request for DRAT to inspect the drive yields the following output:

sudo ./drat-0.1.3-darwin-amd64 inspect /dev/disk3s1
Password:
Opening file at `/dev/disk3s1` in read-only mode ... OK.
Simulating a mount of the APFS container.
Reading container superblock at address 0x0, assuming default block size of 4096 bytes ... FAILED: read_blocks: An unknown error occurred whilst reading from the stream.
ABORT: Failed to successfully read block 0x0.

I wasn’t able to recover any files with DRAT, but I think I was close. I ended up using the trial version of Disk Drill to view a single file I was curious about and stopped my recovery effort there – my other backup was good enough. Should I return to DRAT, the online instructions were helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *