30

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.

  • 1
    I have tried all the above options, but still unable to mount and/or eject the disk. When I attempt to run the First Aid, I get the following: Repairing file system, Volume is already unmounted. Performing fsck_exfat -y -x /dev/rdisk2s1 File system check exit code is 1. Restoring the original state found as unmounted. File system verify or repair failed. Operation failed… Any idea on how to proceed next on this? – Shawnzie20 Feb 21 '18 at 2:04
38

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.

  • 7
    Volume timed out while waiting to eject – Glenn Strycker Nov 8 '17 at 22:47
  • 28
    I was having the exact same issue where unmountDisk would work fine but eject would result in the "timed out" message. I finally found a suggestion to see if fsck was holding the disk hostage. A quick ps aux | grep fsck revealed that indeed it was hijacking the disk/volume as soon as it was plugged in. sudo pkill -f fsck (or just kill with the PID if you prefer) immediately allowed the volume to be mounted. – Ariel Allon Feb 6 '18 at 5:31
  • 1
    @ArielAllon Thanks! Your comment was just as important as the answer. – Jeff Apr 23 '18 at 18:11
  • 1
    @ArielAllon I've been looking for this solution for 2 years. I love you. – connorbode Jun 28 '18 at 14:45
  • 1
    P.s. feel free to upvote my answer below: apple.stackexchange.com/a/314628/54512 – Ariel Allon Jun 29 '18 at 19:41
18

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...

  • 1
    > sudo kill -9 PID solved my problem. Though the volume now is read-only and the system suggest to format it as soon as possible, at least i could copy all the content. Thanks to Ariel Allon & patrix – Alejandro del Río May 8 '18 at 9:09
  • 1
    @AlejandrodelRío Awesome, glad it helped! On a related question/answer (apple.stackexchange.com/questions/268998/…) I made the note that if you do let fsck run its course (might take a few hours) it should complete and allow read/writes again. – Ariel Allon May 8 '18 at 14:04
  • I did this, but the drive was read only. I had to repeat this process after ejecting since the drive won't mount. I ended up repairing the disk (formatted exFat) and it went back to working as normal. – Mark A Jul 4 '18 at 1:36
  • 1
    Wow, this was my problem! I knew something was locking the drive but had no clue what. Thanks! And shame on Apple (Mac Os) for not providing some type of feedback if fsck is running. – Marquez Jul 4 '18 at 21:07
4

If you can see it in diskutil list, locate its identifier (comes in the form of /dev/diskx) and run:

diskutil mountDisk /dev/diskx

while replacing /dev/diskx with your disk identifier.

If even that does not work,

diskutil mountDisk readOnly /dev/diskx

will mount your disk as read-only so that you can get your data off in the case that you have corrupted your disk's partition table (very, very unlikely caused by hard-unplugging your disk). If so, you will need to format your hard drive, through the steps found here, along with the man page obtainable through man diskutil if you need more information.

  • 3
    One or more volume(s) failed to mount for both commands. Thanks anyway – Charles Apr 18 '16 at 12:02
  • @charles try mounting the problematic partition alone, with diskutil mount /dev/diskxsy – perhapsmaybeharry Apr 18 '16 at 12:54
  • @charles do also try the readOnly option – perhapsmaybeharry Apr 18 '16 at 13:00
  • 1
    Volume on disk2s2 timed out waiting to mount with and without readOnly. – Charles Apr 18 '16 at 13:10
  • All answer are not working for me except this with readOnly option. After mount in readOnly mode, I have ejected with finder and physically remove-plugin usb cable again: it works! – Tenaciousd93 Jun 20 '17 at 7:54
1

That has happened to me many times. Go to Launch Pad, Disk Utility, and select the disk that won't mount. Then select Repair.

1

I run into this problem today and I finally solve it by eject the disk first. after that you can successfully mount the disk with no error.

diskutil eject /dev/diskx
diskutil mount /dev/diskx
  • downvote with no reason annoying me, why don't you point up what is wrong with my answer – 7heaven Dec 13 '16 at 1:56
  • both commands timeout or fail – evolutionxbox Jan 21 '17 at 21:17
  • Volume timed out while waiting to eject – Glenn Strycker Nov 8 '17 at 22:47
1

I had the same problem. Failed mount, eject and repair. Windows saved my life. I plugged the external hard disk to a Windows laptop. Copy a file from the external hard disk to the desktop and cut the file in the desktop and paste(replace) back to same location in the external hard disk. Ejected the external hard disk properly from the Windows PC and plugged it to my Macbook. Problem solved.

0

did you try, first of all, to repair the volume looking for errors with disk utility (or terminal)?

  • Disk utility is not fully starting. The message Loading disks never ends. How can I do it with the terminal? – Charles Apr 18 '16 at 13:17
  • diskutil verifyvolume mountpoint and diskutil repairvolume mountpoint – user180055 Apr 18 '16 at 13:19
  • diskutil verifyDisk /dev/disk2 Started partition map verification on disk2 Checking prerequisites Checking the partition list Checking the partition map size Checking for an EFI system partition Checking the EFI system partition's size Checking the EFI system partition's file system Checking the EFI system partition's folder content Problems were found with the partition map which might prevent booting Error: -69854: A disk with a mount point is required – Charles Apr 18 '16 at 13:25
  • Repair says, Repairing the partition map might erase disk2s1, proceed? (y/N). How are the chances I loose the content of the disk? – Charles Apr 18 '16 at 13:26
  • before to do that, check that your gpt map is still ok with sudo gpt show -R disknumber – user180055 Apr 18 '16 at 13:29

You must log in to answer this question.

protected by Community May 8 '18 at 10:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .