No such file or Directory, Directory exists

One of my fstab mounts when missing. I mount a network drive to /mnt/hdd/Media and use a shared library so everything stays in sync. Well, recently none of the videos work anymore. Tried to browse in file manager and couldn’t find anything. Logged in via SSH and got this:

osmc@osmc:/mnt$ ls -l
total 0
drwxr-xr-x 2 osmc osmc 0 Dec 17 21:53 hdd
osmc@osmc:/mnt$ cd hdd
-bash: cd: hdd: No such file or directory
osmc@osmc:/mnt$ mkdir hdd
mkdir: cannot create directory 'hdd': File exists

So clearly the directory exists, but the system won’t let me access it at all. Originally it was owned by Root but I changed ownership to OSMC just in case that was the problem. Still no dice. Any thoughts on what is going on here?

What does your fstab look like?

Please run mount and show us the output.

Hmm. Apparently I have forgotten that I switched to AutoFS (probably per your suggestion).

devtmpfs on /dev type devtmpfs (rw,relatime,size=376680k,nr_inodes=94170,mode=75                                                                              5)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/mmcblk0p2 on / type ext4 (rw,relatime,stripe=1024)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmod                                                                              e=000)
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)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,                                                                              nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa                                                                              ttr,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpu                                                                              set)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,ne                                                                              t_cls)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr                                                                              eezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim                                                                              e,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki                                                                              o)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de                                                                              vices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,mem                                                                              ory)
systemd-1 on /boot type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,ma                                                                              xproto=5,direct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=37,pgrp=1,time                                                                              out=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437                                                                              ,iocharset=ascii,shortname=mixed,errors=remount-ro,x-systemd.automount)
/etc/auto.nfs.shares on /mnt/hdd type autofs (rw,relatime,fd=6,uid=1000,gid=1000                                                                              ,pgrp=505,timeout=15,minproto=5,maxproto=5,direct)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=76460k,mode=70                                                                              0,uid=1000,gid=1000)

I’ll comment out the fstab line since I should be using AutoFS instead of fstab.
But either way, it still isn’t working.

auto.nfs.shares:
/mnt/hdd 192.168.1.60:/mnt/hdd

Did you reboot after removing the fstab entry? If not, you will need to.

that should be:

/mnt/hdd -fstype=nfs 192.168.1.60:/mnt/hdd

Additional details from watching AutoFS

handle_packet: type = 5
handle_packet_missing_direct: token 31, name /mnt/hdd, request pid 3945
attempting to mount entry /mnt/hdd
lookup_mount: lookup(file): looking up /mnt/hdd
lookup_mount: lookup(file): /mnt/hdd -> 192.168.1.60:/mnt/hdd
parse_mount: parse(sun): expanded entry: 192.168.1.60:/mnt/hdd
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("192.168.1.60:/mnt/hdd") -> 192.168.1.60:/mnt/hdd
parse_mount: parse(sun): core of entry: options=, loc=192.168.1.60:/mnt/hdd
sun_mount: parse(sun): mounting root /mnt/hdd, mountpoint /mnt/hdd, what 192.168.1.60:/mnt/hdd, fstype nfs, options (null)
mount_mount: mount(nfs): root=/mnt/hdd name=/mnt/hdd what=192.168.1.60:/mnt/hdd, fstype=nfs, options=(null)
get_nfs_info: called with host 192.168.1.60(192.168.1.60) proto 6 version 0x30
get_nfs_info: called with host 192.168.1.60(192.168.1.60) proto 17 version 0x30
mount(nfs): no hosts available
dev_ioctl_send_fail: token = 31
failed to mount /mnt/hdd

Wiki doesn’t have the file system type. I’ll add it now and reboot. see what happens.

I forgot, it defaults to nfs, so the -fstype isn’t really needed, but it won’t hurt.

There’s your problem. What do you get from:

showmount -e 192.168.1.60
osmc@osmc:/mnt$ showmount -e 192.168.1.60
clnt_create: RPC: Program not registered

That tells me the nfs isn’t running on the server. What are you using as a server?

Interesting. Vero4k with external HDD.

On the Vero acting as the nfs server, try:

systemctl status nfs-server

and share the output.

Yup, failure.

osmc@OSMCV4K:~$ systemctl status nfs-server
* nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor prese
   Active: failed (Result: exit-code) since Wed 2020-12-16 18:58:47 PST; 1 day 2
  Process: 449 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE
  Process: 456 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCES
  Process: 461 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS

Warning: Journal has been rotated since unit was started. Log output is incomple
lines 1-8/8 (END)...skipping...
* nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-12-16 18:58:47 PST; 1 day 21h ago
  Process: 449 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
  Process: 456 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 461 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Have you tried rebooting the server Vero?

What’s the content of /etc/exports on the server?

Oh boy, now I’m going down a rabbit hole. Reboot changed nothing, but I noticed an error as I was watching it boot up that I think is related in a big way.

I messed with my ip-tables as per this post: IPTables Mangle - Help and Support / Vero 4K / Vero 4K + - OSMC Forums
and it looks like its coming back to bite me.

latest logs which has the netfilter error: https://paste.osmc.tv/ikuhixupor

I haven’t used iptables, but looks like you have a configuration problem:

Nov 26 15:29:05 OSMCV4K netfilter-persistent[2039]: iptables-restore v1.8.2 (nf_tables): Couldn't load match `owner':No such file or directory
Nov 26 15:29:05 OSMCV4K netfilter-persistent[2039]: Error occurred at line: 6
Nov 26 15:29:05 OSMCV4K netfilter-persistent[2039]: Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Nov 26 15:29:05 OSMCV4K netfilter-persistent[2039]: run-parts: /usr/share/netfilter-persistent/plugins.d/15-ip4tables exited with return code 2

Do you really need iptables? Since it appears that it’s not working, maybe just remove it?

Also, have a look at this post. It may be related:

just apt-get remove iptables ?

I’ve never used iptables, so I don’t want to say that that’s OK. Maybe @dillthedog or @Tom_Doyle can advise.

Also, check the post I added to my previous comment (I edited it)

Back in business. I just went backwards through the split tunneling guide and took out different rules and removed the iptables-persistent thing I installed. I don’t believe I installed IPtables, so I left that alone. Either way, now I’m able to navigate without issue.

Really appreciate you spending time with me on this issue. Thank you for all you do for this community!

Good news! Happy to have been able to help!