You are not logged in.

#1 2018-01-28 17:39:21

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

[Solved] Problem unmounting an SSHFS remote directory

I can successfully mount directory via SSHFS. However whenever I unmount with fusermount3 -u /home/lenovo/tufserver I get this message:

fusermount3: entry for /home/lenovo/tufserver not found in /etc/mtab

The directory remains mounted. Anyway of fixing this?

Last edited by d_fajardo (2018-01-28 19:08:47)

Offline

#2 2018-01-28 18:00:35

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [Solved] Problem unmounting an SSHFS remote directory

That error message seems pretty clear: is /home/lenovo/tufserver actually listed in /etc/mtab?

If not, does /etc/mtab look OK otherwise? It should list the other mounted filesystems listed in there.
If not, does /etc/mtab point to the right file? AFAIK it should be a symbolic link to ../proc/self/mounts.

Last edited by ayekat (2018-01-28 18:04:34)


pkgs │ hacks │ cfg │ blag

Offline

#3 2018-01-28 18:32:41

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: [Solved] Problem unmounting an SSHFS remote directory

Thanks ayekat. The directory is not listed in /etc/mstab

I'm not sure how to answer your next question so I've copied my /etc/mstab

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=7643964k,nr_inodes=1910991,mode=755 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/nvme0n1p2 / btrfs rw,relatime,ssd,space_cache,subvolid=5,subvol=/ 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13888 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
/dev/nvme0n1p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/nvme0n1p3 /home btrfs rw,relatime,ssd,space_cache,subvolid=5,subvol=/ 0 0
/dev/sdb /mnt/BackupDrive btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0
/dev/sda /home/DataPool btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=1531368k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0

And yes /etc/mstab does point to .../proc/self/mounts

Do you need to mount the directory prior to SSHFS?

Last edited by d_fajardo (2018-01-28 18:57:56)

Offline

#4 2018-01-28 18:49:15

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [Solved] Problem unmounting an SSHFS remote directory

OK, that seems indeed a bit odd.
I assume you have verified that sshfs succeeds mounting the remote filesystem, and the changes in that directory are really reflected on the remote system?
Otherwise I'm a bit out of ideas here...

--edit

Do you need to mount the directory prior to SSHFS?

No - the act of invoking sshfs (which uses FUSE behind the scenes) mount the filesystem. The only condition is that the directory exists (and is writable? not sure about that).

Last edited by ayekat (2018-01-28 18:50:44)


pkgs │ hacks │ cfg │ blag

Offline

#5 2018-01-28 19:00:25

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: [Solved] Problem unmounting an SSHFS remote directory

I am able to mount the remote directory. I can navigate through it and even exchange files between home and remote.
Could this have something to do with fuse?

Offline

#6 2018-01-28 19:05:41

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: [Solved] Problem unmounting an SSHFS remote directory

I found the solution. I need to use sudo to unmount.
When I run sudo fusermount3 -u /home/lenovo/tufserver, the directory unmounts.
Thanks for help ayekat.

Offline

#7 2018-01-28 19:48:56

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [Solved] Problem unmounting an SSHFS remote directory

That's not really how it's supposed to be, though. Filesystems mounted as a non-root user with FUSE (e.g. sshfs) are supposed to be unmountable by that same user.

How exactly do you sshfs the remote directory? Please paste the command you run.


pkgs │ hacks │ cfg │ blag

Offline

#8 2018-01-29 23:10:50

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: [Solved] Problem unmounting an SSHFS remote directory

Yes you are right ayekat. I've been using sudo (bad idea!) that's why I couldn't mount it. I tried without sudo and works fine.
Completely my mistake.

Offline

Board footer

Powered by FluxBB