I have shared a tmp directory on Ubuntu, using sshfs userid@ip:path_to_dir/rdir /path_to_dir/tmp after this I deleted rdir but when I tried umount /path_to_dir/tmp it was unable to do that.
Now whenever I do ls it shows

ls: cannot access 'tmp': No such file or directory
check.cpp                 tmp

and output of ls -al is really weird

-rw-rw-r--  1 userid   userid          84 Oct  5 12:49 check.cpp
d?????????  ? ?        ?               ?            ? tmp

Can anyone explain this behavior and how can I unmount this directory properly
I don't know the proper tags. Please add proper tags so it reaches to the right person.
Thanks in advance


pranjald@pranjald-ubuntu:~/Desktop$ mount | grep tmp
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16383840k,nr_inodes=4095960,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=3281548k,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3281544k,mode=700,uid=1000,gid=1000)
pranjald@ on /home/pranjald/Desktop/tmp type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

pranjald@pranjald-ubuntu:~/Desktop$ sudo fusermount -u tmp
fusermount: failed to unmount /home/pranjald/Desktop/tmp: Invalid argument
  • 1
    Please edit your question and show us the output of mount | grep tmp. Also, does sudo fusermount -u /path_to_dir/tmp unmount it?
    – terdon
    Oct 27 '20 at 10:54
  • @terdon I've updated the question with suggested output. Oct 27 '20 at 11:01
  • 1
    Quite strange. On a different GNU/Linux I could reproduce your issue (same mount output, same ls output after deleting the directory underlying the mount point), but both fusermount -u /path/to/tmp and sudo umount /path/to/tmp did unmount successfully. Which version of Ubuntu are you using?
    – fra-san
    Oct 27 '20 at 11:10
  • @fra-san I am using 18.04 Oct 27 '20 at 11:15
  • 1
    @PranjalDoshi I used the commands from my previous comment. You should have umount on Ubuntu, it's from the mount package, which should be installed by default. Same thing for fusermount from the fuse package.
    – fra-san
    Oct 27 '20 at 11:34

Your Answer

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

Browse other questions tagged or ask your own question.