14

Not long ago my Xserve failed (power loss) while an iMac was working with files on a particular network share (called "Work Share"). This volume, "Work Share", is now stuck. It can't be seen in the GUI, you can only detect it using the Terminal. Even after power cycling over the course of several days, ls -a still shows that it's there, but I can't unmount it using any command - not even as root in single user mode.

Every time I attempt to unmount that volume (hdiutil, diskutil, umount), I get the message that the resource is busy (which it can't possibly be since nothing is using it), and error code 4915 or it otherwise just fails.

The issue is that when I mount the real "Work Share", it internally is renamed to "Work Share-1", which breaks all my links, and several files in the share. If I can't unmount the false "Work Share", then that computer would be unuseable without a reformat, I would imagine - and I don't want it to have to come to that.

I've tried everything I can think of - it looks like sudo can't save me now.

Any ideas on how to unmount this stuck volume?

5 Answers 5

10

Other than seeing a folder with that name in /Volumes, how do you know that the remote share is still mounted? Does mount or diskutil list still show it as mounted? If not, then what you've got is not a stuck mount, but a mountpoint directory that was left behind after the remote share went away unexpectedly. If there are any files in that directory, they exist on your local boot drive, and were probably written by whatever processes were running on the iMac that had been working with that share.

If this is the case, then you can fix it just by moving aside the left-behind directory and files:

sudo mv /Volumes/Work\ Space ~/Desktop

...and then re-mounting your remote share.


But if mount shows the remote share still mounted, well, that kind of state doesn't survive a reboot, so unless you're in some situation where you don't want to reboot, I'd say just reboot the iMac.

0
15

First try sudo umount -f YOURDEVICE if it does not work, delete the entry in /etc/mtab, if this file exists on MacOS. The file should normally get updated automatically, but maybe it got corrupt.

If editing is impossible delete it with rm -f. It should be recreated.

6
  • 1
    umount did not work, and mtab does not exist on Mac. Thanks.
    – Kyle Lowry
    Feb 24, 2011 at 16:18
  • 5
    umount -f worked for me
    – Rob
    Oct 16, 2012 at 22:12
  • umount -f hanging for me
    – nhed
    Jan 9, 2016 at 0:58
  • 1
    sudo umount -f /Volumes/Testie Saved me from having to restart
    – Ray Foss
    Aug 20, 2018 at 20:41
  • umount shows "resource busy". /etc/mtab does not exist. Does not work for me.
    – woens
    Jul 11, 2020 at 23:48
4

I'm on Mac OS 10.12.2 Sierra and the above didn't work. What did work was:

  1. In a terminal, I ran sudo umount -Af -t nfs,smbfs
  2. Then I changed to the /Volumes directory (cd /Volumes) and removed the residual mount point folders. The folder name(s) will be different depending on the name of the folder(s) you had mounted but my folder was called Athena so I did sudo rm -rf Athena/ after verifying that folder was empty with ls Athena/. If you've mounted the folder multiple times there may be other residual folders with names like Athena-1/ , Athena-2/, etc. which should be removed as well.
  3. Then try reconnecting to the share in Finder and it should be successful.

I also unchecked "Connected Servers" in the preferences for Finder (I'm not sure if this had any effect).

2
  • 3
    To remove a folder only if it's empty, use rmdir. Jun 14, 2017 at 20:25
  • This seems to work for unmounting. Finder still shows the volumes, though. Sep 14, 2017 at 20:37
0

I'm on Mac OS 10.13.6 High Sierra and the prior answers weren't working for me. In my case, I had created an automount via /etc/fstab and the folder in my case was called Pandora and was owned by root. What did work for me was:

  1. In terminal, ran vi /etc/fstab and removed the line with Pandora mount I wanted to delete.
  2. Rebooted Mac
  3. Now I noticed the folder Pandora was no longer owned by root, but now instead owned by normal user account.
  4. Deleted the folder via terminal with rm -rf Pandora/
0

Just forced the Finder to relaunch, and item was gone ...

You must log in to answer this question.

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