External drive does not mount after plug off without eject
I accidentally unplugged my hard drive without properly ejecting it, and now the drive does not mount when plugged in.
What can I do to make it work again?
I can see the disk in lsusb
and diskutil list
.
So far, I've tried:
sudo diskutil unmountDisk force /dev/disk2
sudo diskutil unmount force /dev/disk2
- Reboot with disk.
- Reboot without disk.
It seems that the disk is working because it's vibrating very slowly, but I can't see it in Finder.
Solution 1:
SOLVED. Had this problem today. OLD external drive, had its own power source, plugged into a surge protector. I hit the power button on the surge protector when I was unplugging something else, and the drive was turned off while in use. I turned it back on and it sounded normal, but my computer wasn't recognizing it, and Disk Utility wouldn't load when it was plugged in. I tried restarting with and without the disk, mounting, unmounting, all of the above recommendations.
"unmount" led to "the disk is already unmounted or has a partitioning scheme...."
"mount" and "eject" said the attempt timed out.
"mountDisk" said it was successfully mounted, but I still couldn't access it, and "unmountDisk" would be successful as well, but no luck to "mount" or "mountDisk" afterwards.
I finally found the order that worked.
diskutil unmountDisk /dev/disk2
diskutil eject /dev/disk2
then I just plugged it back in to my computer and we were golden. Thanks for all your help everyone.
Solution 2:
I'd recommend checking if fsck
is holding your disk hostage upon connection. This was it for me.
Running ps aux | grep fsck
revealed:
root 2587 7.3 0.1 4363584 21780 ?? U 10:56PM 2:22.54 /System/Library/Filesystems/exfat.fs/Contents/Resources/./fsck_exfat -y /dev/rdisk2s1
So the solution was a sudo kill -9 2587
(insert your PID instead of 2587) (or sudo pkill -f fsck
).
As soon as that ran, my Volume immediately mounted.
Oh the irony of fsck
being the problem...
Addendum (from a related question/answer): Ideally, you're better off letting fsck
run its course. Otherwise, you'll run into this the next time too.