3

So I goofed when using sshfs and the folder I was using as a mountpoint for the server has been borked. The server wasn't unmounted correctly (I think due to a network drop out).

consequently, when I ls my /Volumes/ where I had originally made the mountpoint folder I now get an I/O error:

joehealey@Joes-MacBook-Pro:/Volumes$ ls -al
ls: mountpoint: Input/output error
total 24
drwxrwxrwt@  7 root       admin   238 21 Oct 13:08 ./
drwxr-xr-x  37 root       wheel  1326  3 Oct 12:38 ../
-rw-r--r--@  1 joehealey  admin  6148 22 Sep  2014 .DS_Store
drwxr-xr-x   1 joehealey  staff  8192 28 Jul 20:04 BOOTCAMP/
lrwxr-xr-x   1 root       admin     1 15 Oct 08:52 Macintosh HD@ -> /
drwxrwxrwx   0 root       wheel     0 21 Oct 13:08 MobileBackups/
joehealey@Joes-MacBook-Pro:/Volumes$ mkdir mountpoint
mkdir: mountpoint: File exists
joehealey@Joes-MacBook-Pro:/Volumes$

I've seen similar problems in thread such as this where the suggestions are to nuke the whole disk etc. Now, I'm not so concerned by this that I'm prepared to go that far, so I'm just wondering if there is any way to force-remove and resolve this specific instance?

  • If you run the mount command does it still think that the sshfs is mounted? – Eric Renouf Oct 21 '15 at 12:49
  • I can mount the server again, but cannot use that folder. I have to create another. As far as the Mac is concerned from what I can tell, it doesn't think the server/sshfs is mounted as it doesn't appear in Volumes/Finder etc etc. – Joe Healey Oct 21 '15 at 14:36
  • If you run mount without any arguments it should show you all the currently mounted filesystems, that might show a "dangling" mount at the old mount point, you could try unmounting it if that's the case, I'm not familiar enough with OSX to know whether Finder or anything else would show such something like that – Eric Renouf Oct 21 '15 at 14:47
  • Ah yes mount has shown up the mapped drive. Presumably if I try to unmount it now that might remove this "dangling" directory? – Joe Healey Oct 21 '15 at 14:57
1

You can just unmount it like usual for an sshfs volume:

fusermount -u /Volumes/mountpoint

(At least, this works on Linux. I'm not wholly sure how sshfs/FUSE works on OS X.)

  • Apparently the fusermount command isn't found despite the fact that sshfs seems to work fine otherwise. I've read it's bad practice to use umount for sshfs drives? – Joe Healey Oct 21 '15 at 15:18
  • On Linux at least, it just doesn't work to use umount for fuse mounts. (I've heard rumors of somehow installing a umount helper to allow it to, but never actually seen this in reality.) However, if fusermount isn't present, I have no further insight into the state of unmounting fuse mounts in OS X. You could try umount just for fun; in any case it shouldn't break anything. – Tom Hunt Oct 21 '15 at 15:21
  • There seemed to be no objections from terminal for simply using umount. I was able to remake the directory and mount no longer shows it. If anyone has any further insight in to why umount shouldn't be used (if that is even true) I'm all ears... – Joe Healey Oct 21 '15 at 17:53
  • It's quite possible that on OS X umount is the way to go. It wouldn't be unexpected for the functionality to differ, with something as tied to the kernel as FUSE is. – Tom Hunt Oct 21 '15 at 17:58
1

Simply using:

umount /Volumes/mountpoint

Has solved it. No idea why fsusermount -u wasn't an option for my install. Perhaps someone else will know(?).

For full reference:

Before

joehealey@Joes-MacBook-Pro:/Volumes$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk0s4 on /Volumes/BOOTCAMP (ntfs, local, read-only, noowners)
localhost:/nWFBTycSJIUVhjjjh8YMP4 on /Volumes/MobileBackups (mtmfs, nosuid, read-only, nobrowse)
wms_joe@DMI:/home/wms_joe/ on /Volumes/mountpoint (osxfusefs, nodev, nosuid, synchronous, mounted by joehealey)

The wms_joe@DMI: server on mountpoint is the offending article.

Unmounting

joehealey@Joes-MacBook-Pro:/Volumes$ umount /Volumes/mountpoint

After

joehealey@Joes-MacBook-Pro:/Volumes$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk0s4 on /Volumes/BOOTCAMP (ntfs, local, read-only, noowners)
localhost:/nWFBTycSJIUVhjjjh8YMP4 on /Volumes/MobileBackups (mtmfs, nosuid, read-only, nobrowse)

Now able to remake the previously denied folder

joehealey@Joes-MacBook-Pro:/Volumes$ mkdir mountpoint
joehealey@Joes-MacBook-Pro:/Volumes$ ls
BOOTCAMP      Macintosh HD  MobileBackups mountpoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.