Hacker News new | ask | show | jobs
by lisper 5823 days ago
Youch! Beware, there are hidden pitfalls here.

I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge (it's my development folder) so I'd much prefer not to have to do a restore. This is MacFuse 2.0.3 running on Snow Leopard. Any suggestions on how to proceed would be greatly appreciated.

3 comments

Your data is fine -- it's hidden while something else is mounted on top of the folder.

Rebooting will fix it. But you should be able to just unmount the filesystem, which will also fix it. Does 'mount' list something mounted there? Does 'df /path/to/folder/' reflect the FUSE filesystem rather than the underlying filesystem? The input/output error sounds like the FUSE filesystem being mounted indeed, and just being broken.

> Your data is fine -- it's hidden while something else is mounted on top of the folder.

I thought that was the case. But the truth is I don't really understand how mount points work under the hood. Where is the mount point information actually stored? I'm guessing it's in kernel memory somewhere, but I don't really know, and Googling hasn't been much help. Is there an article somewhere that explains this?

> Rebooting will fix it.

Good to know.

> But you should be able to just unmount the filesystem

Yeah, you'd think. But everything I try to do to that directory results in "Input/output error".

> Does 'mount' list something mounted there?

Yes:

Python@fuse0 on /Users/ron/devel (fusefs, nodev, nosuid, synchronous, mounted by ron)

> Does 'df /path/to/folder/' reflect the FUSE filesystem rather than the underlying filesystem?

  [ron@mickey:~]$ df devel
  df: devel: Input/output error
  [ron@mickey:~]$ umount devel
  umount: devel: not currently mounted
  [ron@mickey:~]$ ls devel
  ls: devel: Input/output error
You can hopefully see why I'm puzzled. I would really like to understand why this is happening.
Figured it out. umount wanted an absolute path.
Have you tried `fusermount -u` on the mountpoint? That's the fuse-specific command to force an unmount, which might clean up the FUSE mount even if the OS's VFS layer doesn't think there's a mountpoint there.
I'm running MacFuse. The fusermount command is specific to Linux.
Time to get a real OS, it sounds like.
have you tried rebooting?
Not yet. I was hoping to find a less drastic (and more educational) fix. I'm also a little worried that rebooting might make the situation worse since I don't really understand how FUSE works under the the hood.