Mac – How to forceably unmount stuck network share in Mac OS X

macnetwork-sharesunmountxserve

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?

Best Answer

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.

Related Question