Friday, 13 July, 2018

Fixing an exFAT drive on a Mac

I have tested this with macOS 10.13.6 on a MacPro cylinder
On a LaCie Quadra 4TB drive which was exFAT and was not mounting on the Mac, but appeared in Disk Utility. First Aid in Disk Utility could not repair this drive.

Quoting from various resources on the net...

Looked like crazy on the net for solutions but couldn't find any. I started to poke around in the terminal and ran this:

fsck_exfat -d disk0s4

The -d flag is the debug flag and it gave me hope. I saw all my files flashing by and after a while I got this question:
Main boot region needs to be updated. Yes/No?

I picked yes and it said that it repaired the drive. It didn't appear on the desktop though. I ran fsck_exfat again and now it said that the disk was ok. I fired up Disk utility and tried to repair the drive there once again and now disk utility could repair it! =))) 

Just wanted to share this lil advice since it seems common that exfat partions gets corrupted in OSX. I have no idea why Disk Utility doesn't call fsck and instead says that the disk can't be repaired. The tools for repairing it is in the OS and apparently and obviosusly it was fixable ( my case).

sudo fsck_exfat -d disk0s4

where diskos4 is your ExFAT partition.

It then asks:

Main boot region needs to be updated. Yes/No?

to which you reply Yes. You can then run repair in the OSX Disk Utility and the partition should be restored!

From comments at the bottom of the article

Another tip I discovered:

When you run fsck_exfat on your drive and it comes up “Resource Busy” you can use the following commands:

This will give you a list of processes using your disk:
ps -ax | grep disk2 (but your disk)

You will get something like this:
13699 ?? 11:52.83 /System/Library/Filesystems/hfs.fs/Contents/Resources/./fsck_hfs -y /dev/disk2s2

Run this to kill that process
sudo kill 13699

Repeat until it lets you fsck_exfat your drive