1

I have mounted a SSH "share" using Thunar and the remote machine has been powered off before I thought of unmounting it. Now Thunar freezes for a while (like 20-30 seconds) whenever I hit the "eject" icon, then displays a time out message but doesn't unmount anything. I don't seem to read any "forced" option to remove the mount though:

$ gvfs-mount --help
Usage:
  gvfs-mount [OPTION...] [LOCATION...]

Mount the locations.

Help Options:
  -h, --help                      Show help options

Application Options:
  -m, --mountable                 Mount as mountable
  -d, --device=DEVICE             Mount volume with device file
  -u, --unmount                   Unmount
  -e, --eject                     Eject
  -s, --unmount-scheme=SCHEME     Unmount all mounts with the given scheme
  -l, --list                      List
  -o, --monitor                   Monitor events
  -i, --detail                    Show extra information

EDIT: Here are the running gvfs processes:

$ pgrep -lf gvfs
2777 /usr/lib/gvfs/gvfsd
2786 /usr/lib/gvfs//gvfsd-fuse -f /run/user/1000/gvfs
2811 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
2833 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
2837 /usr/lib/gvfs/gvfs-afc-volume-monitor
2847 /usr/lib/gvfs/gvfs-mtp-volume-monitor
2988 /usr/lib/gvfs/gvfsd-trash --spawner :1.10 /org/gtk/gvfs/exec_spaw/0
5441 /usr/lib/gvfs/gvfsd-burn --spawner :1.10 /org/gtk/gvfs/exec_spaw/43
13555 /usr/lib/gvfs/gvfsd-http --spawner :1.10 /org/gtk/gvfs/exec_spaw/37
15402 /usr/lib/gvfs/gvfsd-sftp --spawner :1.10 /org/gtk/gvfs/exec_spaw/61
24575 /usr/lib/gvfs/gvfsd-metadata

Is there a secret sauce to remove the mount point and let Thunar go off it? (Shall I say «without loggin off»?)

  • Are there any gvfs processing running which relate to the mounted SSH 'share'? Doing some reading, it looks like killing them might be the only option. In other words, what does ps -ef | grep gvfs return (can you add the output of it to the question). – EightBitTony Apr 15 '16 at 13:30
  • @EightBitTony I updated my question with the list of gvfs processes. I guess 2786 is the one to kill? – user86969 Apr 15 '16 at 15:04
  • To be fair, not sure, I'd be tempted to recycle the daemon (but don't know what impact that has generally) if this is the only mounted filesystem. Or yes, give 2786 a poke with the pointy stick. – EightBitTony Apr 15 '16 at 16:29
  • @EightBitTony Yes, I was wondering, too, if it was a good idea to kill the beast. I'll try and report what happened. – user86969 Apr 17 '16 at 21:45
0

The proper way I found out on Ubuntu was sudo fuser -a -k /usr/lib/gvfs. Check more details with man fuser command.

  • 1
    Thanks. Glad to know. Mint has long gone from my laptop but the principle remains, of course. – user86969 Aug 11 '16 at 15:19
  • I also switch from Mint back to Ubuntu some months ago. The main reason for switching is that I couldn't add PPAs, and some other compatibility, stability problems. It started out as a nice and convenient flavor, but is not good for advanced uses. – biocyberman Aug 11 '16 at 17:24
0

Thanks to @EightBitTony, a simple pkill -e -HUP gvfsd-fuse did the trick. The phantom mount has now disappeared from Thunar. Consequently, gvfsd-fuse was smart enough to respawn:

$ pgrep -lf gvfsd-fuse
2786 /usr/lib/gvfs//gvfsd-fuse -f /run/user/1000/gvfs
0

To reset the stuck mount, I killed the gvfsd-sftp process.

i did

mrinvader@skyfall:~$ pgrep -lf gvfs
5103 gvfsd
6487 gvfs-udisks2-vo
6500 gvfs-mtp-volume
6505 gvfs-gphoto2-vo
6510 gvfs-goa-volume
6515 gvfs-afc-volume
6528 gvfsd-trash
6539 gvfsd-metadata
25082 gvfsd-network
25091 gvfsd-smb-brows
25111 gvfsd-dnssd
26009 gvfsd-sftp
mrinvader@skyfall:~$ kill 26009
mrinvader@skyfall:~$ kill 26009
bash: kill: (26009) - No such process

then went back too thunar and remounted when the share came back

Your Answer

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