81

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
  • 2
    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
    Commented Feb 21, 2018 at 2:04

9 Answers 9

78

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.

13
  • 15
    Volume timed out while waiting to eject Commented Nov 8, 2017 at 22:47
  • 65
    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. Commented Feb 6, 2018 at 5:31
  • 1
    @ArielAllon Thanks! Your comment was just as important as the answer.
    – Jeff
    Commented Apr 23, 2018 at 18:11
  • 1
    @ArielAllon I've been looking for this solution for 2 years. I love you.
    – connorbode
    Commented Jun 28, 2018 at 14:45
  • 3
    Thanks a lot for all the help! I tried everything, including the fsck stuff but it didn’t work… then, I gave it up, browsing for a new highend SSD because this made me sick! Suddenly, I heard the hard drive working!… something had happened by itself, just after waiting some time. I just like to add this, maybe it helps others, too. Commented Apr 23, 2020 at 14:40
70

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.

9
  • 3
    > 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 Commented May 8, 2018 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. Commented May 8, 2018 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
    Commented Jul 4, 2018 at 1:36
  • 3
    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
    Commented Jul 4, 2018 at 21:07
  • 2
    essentially every time you disconnect the external drive without ejecting, MacOS will quietly run fsck on that drive next time you plug it in. For a large drive it will take a while...without any info whatsoever. The irony of Apple's UI being the problem :) Commented May 5, 2021 at 8:25
8

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.

5
  • 3
    One or more volume(s) failed to mount for both commands. Thanks anyway
    – Charles
    Commented Apr 18, 2016 at 12:02
  • @charles try mounting the problematic partition alone, with diskutil mount /dev/diskxsy Commented Apr 18, 2016 at 12:54
  • @charles do also try the readOnly option Commented Apr 18, 2016 at 13:00
  • 1
    Volume on disk2s2 timed out waiting to mount with and without readOnly.
    – Charles
    Commented Apr 18, 2016 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! Commented Jun 20, 2017 at 7:54
3

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

2
  • Lol. I selected unmounted disk volume, clicked "Restore" and after confirmation dialog was showed it suddenly appeared as mounted without even restoring !? Commented Jun 6, 2020 at 7:19
  • 1
    "Repair" means reformat your drive. Don't do that. Commented Oct 14, 2020 at 0:54
2

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.

2

Easy solution. Following steps fixed the issue for me:

1. Run the following command to check that nothing is blocking disk mounting:

ps aux | grep fsck

2. If fsck is using the disk, you need to kill the process.

For example for this result:

enter image description here

Kill the process running the following command:

sudo kill -9 1536

3. Here the disk is mounted and you'll be able to use it. You can check it on Finder, but to avoid repeating all previous steps each time you use the disk, continue with following steps.

4. Eject the disk from Finder like always, with up arrow

enter image description here

5. After ejecting the device from Finder, you'll see fsck running again same command used on step 1. So you'll need to wait for fsck finish, before disconnecting the disk. This took me around 27 mins for 1Tb disk. Then, the disk will work like always

1
  • Thanks for the tips. I also waited for some time after connecting the disk. It did not mount for like 10 minutes, but after an hour it was mounted by itself (for 5Tb disk).
    – Berk
    Commented Nov 21, 2021 at 18:24
1

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

15
  • Disk utility is not fully starting. The message Loading disks never ends. How can I do it with the terminal?
    – Charles
    Commented Apr 18, 2016 at 13:17
  • 1
    before to do that, check that your gpt map is still ok with sudo gpt show -R disknumber
    – user180055
    Commented Apr 18, 2016 at 13:29
  • 1
    sudo gpt show -l disk2 gpt show: disk2: Suspicious MBR at sector 0 start size index contents 0 1 MBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - "EFI System Partition" 409640 2008 411648 3906549760 2 GPT part - "CHARLES-HDD" 3906961408 2015 3906963423 32 Sec GPT table 3906963455 1 Sec GPT header
    – Charles
    Commented Apr 18, 2016 at 13:32
  • 1
    disk2s1 is your EFI partition, that's okay to erase. Your data should remain where it is Commented Apr 18, 2016 at 13:35
  • 1
    I don't think that OS X can handle such partition as it would do with hfs partitions however you can try gdisk utility from sourceforge.net/projects/gptfdisk but I am not familiar with that, I just know it has "generic" repair (non destructively) features even for windows gpt partitions
    – user180055
    Commented Apr 18, 2016 at 14:14
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
3
  • downvote with no reason annoying me, why don't you point up what is wrong with my answer
    – 7heaven
    Commented Dec 13, 2016 at 1:56
  • both commands timeout or fail Commented Jan 21, 2017 at 21:17
  • Volume timed out while waiting to eject Commented Nov 8, 2017 at 22:47
0

My solution. After unplugging HDD drive without properly ejecting it, the drive became invisible in Finder when plugged it again. Also Disk Utility did not show any drives at all while this drive was connected. Reboot was not helpful.

First solution. Earlier in such case I plugged the drive to Windows PC and after fixing there it started working also on Mac.

However I was interested to return it to life only on Mac.

So the solution in my case (Mac mini M1, Sonoma 14.0).

  1. A command "ps aux | grep fsck" in Terminal gives PID of the drive and then

  2. A command "sudo kill -9 PID"

  3. I repeated "ps aux | grep fsck" and find new PID for the drive.

  4. Made again "sudo kill -9 PID". At this point the drive disappeared in fsck (see a picture).

  5. After that I was able to start Disk Utility and my HDD appeared there.

  6. Started First Aid. It was successful.

  7. Pressed Mount, and the HDD appeared in Finder.

enter image description here

You must log in to answer this question.

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