Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to unmount sshfs mounted on FUSE filesystem #67

Open
artgoldberg opened this issue May 11, 2021 · 5 comments
Open

How to unmount sshfs mounted on FUSE filesystem #67

artgoldberg opened this issue May 11, 2021 · 5 comments

Comments

@artgoldberg
Copy link

Hello sshfs

Following the directions in SSHFS, I've mounted a remote directory on a local directory.

The line in the mount table is

uid@xxx:/var/opt/leafapi/ on /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/leafapi_on_vm (macfuse, nodev, nosuid, synchronous, mounted by arthur_at_sinai)

The connection has gone stale and I'd like to remount it. Reissuing this command

sshfs uid@xxx:/var/opt/leafapi/ ~/gitOnMyLaptopLocal/sc_repos/leafapi_on_vm

generates

mount_macfuse: mount point /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/leafapi_on_vm is itself on a macFUSE volume

But various attempts to use umount fail. E.g.,

umount /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/leafapi_on_vm

generates

umount(/Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/leafapi_on_vm): Resource busy -- try 'diskutil unmount'

And diskutil unmount says:

Unmount failed for uid@xxx:/var/opt/leafapi/

Running macOS Big Sur.

Assistance would be greatly appreciate.

Arthur

@artgoldberg
Copy link
Author

Still a problem.

@artgoldberg
Copy link
Author

Folks, if you're running into this, and easy workaround is to just create a new mount point. E.g., if ~/local_dir is still mounted, instead of

sshfs uid@xxx:/remote/dir ~/local_dir

execute

sshfs uid@xxx:/remote/dir ~/local_dir_2

Eventually -- and certainly after rebooting -- the mount points will be released.

@poetaman
Copy link

@artgoldberg If you run unmount from within a mounted directory then it will fail with this for sure. Not sure what other cases would lead to that.

@ToeKneeFan
Copy link

ToeKneeFan commented Dec 21, 2021

Maybe this is obvious, but if the resource is being used by some process (that is, the resource is actually busy), then that could prevent the unmount. Remounting a stale sshfs mount is unfortunately a little cumbersome (close/kill any processes using that node, sudo umount manually, then remount with sshfs).

@dantiel
Copy link

dantiel commented Aug 25, 2022

i have often problem with hanging volumes. at least in this case umount -f /sshdir worked for me and allowed remount at the same node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants