Vero 4k fstab/autofs problem

Hi,

I have been having some weird problems with my Vero 4k since a new broadband router was installed and have ended up doing a reinstall of OSMC from scratch. Previously I was using fstab to mount my ReadyNAS without issue. I am now trying to set this up again and thought I would try autofs this time round as recommended, but couldn’t get this to work (error along the lines of dev_ioctl_send fail: Token 12).

I thought I would go back to good old fstab, but find that is failing as well. Logs are here https://paste.osmc.tv/abavefobor

My /etc/fstab line is:
192.168.1.210:/c/media /mnt/NASFiles nfs noauto,x-systemd.automount 0 0

I have tried adding nfsver=4 (after x-systemd.automount), but that just changes the error message when I sudo mount /mnt/NASFilms (an incorrect mount option was specified).

TIA

Well, for me it looks like you have now both active: autofs (see the active mounts in your logs) and the fstab. So, I suggest to first clean one of the methods: Either fstab or autofs.

You make a good point! I have removed the fstab config, so just trying with autofs now.
My entry in auto.nfs.shares is /mnt/NASFiles 192.168.1.210:/c/media

Following the instructions in the wiki article I ran

sudo automount -f -v -d

then connected from another session and tried to ls the mount. Output was this:

Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master file /etc/auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry +dir:/etc/auto.master.d
lookup_nss_read_master: reading master dir /etc/auto.master.d
lookup_read_master: lookup(dir): scandir: /etc/auto.master.d
lookup_read_master: lookup(file): read entry /-
lookup_read_master: lookup(file): read entry +auto.master
lookup_nss_read_master: reading master files auto.master
do_init: parse(sun): init gathered global options: (null)
lookup(file): failed to read included master map auto.master
master_do_mount: mounting /-
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
lookup_nss_read_map: reading map file /etc/auto.nfs.shares
do_init: parse(sun): init gathered global options: (null)
mounted direct on /mnt/NASFiles with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/NASFiles
st_ready: st_ready(): state = 0 path /-
handle_packet: type = 5
handle_packet_missing_direct: token 7, name /mnt/NASFiles, request pid 3131
attempting to mount entry /mnt/NASFiles
lookup_mount: lookup(file): looking up /mnt/NASFiles
lookup_mount: lookup(file): /mnt/NASFiles -> 192.168.1.210:/c/media
parse_mount: parse(sun): expanded entry: 192.168.1.210:/c/media
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("192.168.1.210:/c/media") -> 192.168.1.210:/c/media
parse_mount: parse(sun): core of entry: options=, loc=192.168.1.210:/c/media
sun_mount: parse(sun): mounting root /mnt/NASFiles, mountpoint /mnt/NASFiles, what 192.168.1.210:/c/media, fstype nfs, options (null)
mount_mount: mount(nfs): root=/mnt/NASFiles name=/mnt/NASFiles what=192.168.1.210:/c/media, fstype=nfs, options=(null)
get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 6 version 0x30
get_nfs_info: nfs v3 rpc ping time: 0.000000
get_nfs_info: nfs v2 rpc ping time: 0.000000
get_nfs_info: host 192.168.1.210 cost 0 weight 0
get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 17 version 0x30
get_nfs_info: nfs v3 rpc ping time: 0.000000
get_nfs_info: nfs v2 rpc ping time: 0.000000
get_nfs_info: host 192.168.1.210 cost 0 weight 0
prune_host_list: selected subset of hosts that support NFS3 over TCP
mount_mount: mount(nfs): calling mkdir_path /mnt/NASFiles
mount_mount: mount(nfs): calling mount -t nfs 192.168.1.210:/c/media /mnt/NASFiles
>> mount.nfs: mount system call failed
mount(nfs): nfs: mount failure 192.168.1.210:/c/media on /mnt/NASFiles
dev_ioctl_send_fail: token = 7
failed to mount /mnt/NASFiles
st_expire: state 1 path /-
expire_proc: exp_proc = 4102591568 path /-
expire_cleanup: got thid 4102591568 path /- stat 0
expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
^Xst_expire: state 1 path /-
expire_proc: exp_proc = 4102591568 path /-
expire_cleanup: got thid 4102591568 path /- stat 0
expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
^Cdo_notify_state: signal 2
master_notify_state_change: sig 2 switching /- from 1 to 5
st_prepare_shutdown: state 1 path /-
expire_proc: exp_proc = 4097832016 path /-
expire_cleanup: got thid 4097832016 path /- stat 0
expire_cleanup: sigchld: exp 4097832016 finished, switching from 5 to 7
st_shutdown: state 5 path /-
umount_multi: path /mnt/NASFiles incl 0
set_direct_mount_catatonic: set /mnt/NASFiles catatonic
umounted direct mount /mnt/NASFiles
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
shut down path /-
autofs stopped
osmc@osmc:~$ lookup(file): failed to read included master map auto.master
-bash: syntax error near unexpected token `file'
osmc@osmc:~$ master_do_mount: mounting /-
-bash: master_do_mount:: command not found
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
lookup_nss_read_map: reading map file /etc/auto.nfs.shares
do_init: parse(sun): init gathered global options: (null)
mounted direct on /mnt/NASFiles with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/NASFiles
st_ready: st_ready(): state = 0 path /-
handle_packet: type = 5
handle_packet_missing_direct: token 7, name /mnt/NASFiles, request pid 3131
attempting to mount entry /mnt/NASFiles
lookup_mount: lookup(file): looking up /mnt/NASFiles
lookup_mount: lookup(file): /mnt/NASFiles -> 192.168.1.210:/c/media
parse_mount: parse(sun): expanded entry: 192.168.1.210:/c/media
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("192.168.1.210:/c/media") -> 192.168.1.210:/c/media
parse_mount: parse(sun): core of entry: options=, loc=192.168.1.210:/c/media
sun_mount: parse(sun): mounting root /mnt/NASFiles, mountpoint /mnt/NASFiles, what 192.168.1.210:/c/media, fstype nfs, options (null)
mount_mount: mount(nfs): root=/mnt/NASFiles name=/mnt/NASFiles what=192.168.1.210:/c/media, fstype=nfs, options=(null)
get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 6 version 0x30
get_nfs_info: nfs v3 rpc ping time: 0.000000
get_nfs_info: nfs v2 rpc ping time: 0.000000
get_nfs_info: host 192.168.1.210 cost 0 weight 0
get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 17 version 0x30
get_nfs_info: nfs v3 rpc ping time: 0.000000
get_nfs_info: nfs v2 rpc ping time: 0.000000
get_nfs_info: host 192.168.1.210 cost 0 weight 0
prune_host_list: selected subset of hosts that support NFS3 over TCP
mount_mount: mount(nfs): calling mkdir_path /mnt/NASFiles
mount_mount: mount(nfs): calling mount -t nfs 192.168.1.210:/c/media /mnt/NASFiles
>> mount.nfs: mount system call failed
mount(nfs): nfs: mount failure 192.168.1.210:/c/media on /mnt/NASFiles
dev_ioctl_send_fail: token = 7
failed to mount /mnt/NASFiles
st_expire: state 1 path /-
expire_proc: exp_proc = 4102591568 path /-
expire_cleanup: got thid 4102591568 path /- stat 0
expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
^Xst_expire: state 1 path /-
expire_proc: exp_proc = 4102591568 path /-
expire_cleanup: got thid 4102591568 path /- stat 0
expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
^Cdo_notify_state: signal 2
master_notify_state_change: sig 2 switching /- from 1 to 5
st_prepare_shutdown: state 1 path /-
expire_proc: exp_proc = 4097832016 path /-
expire_cleanup: got thid 4097832016 path /- stat 0
expire_cleanup: sigchld: exp 4097832016 finished, switching from 5 to 7
st_shutdown: state 5 path /-
umount_multi: path /mnt/NASFiles incl 0
set_direct_mount_catatonic: set /mnt/NASFiles catatonic
umounted direct mount /mnt/NASFiles
automount_path_to_fifo: fifo name /var/run/autofs.fifo--
shut down path /-
autofs stopped
osmc@osmc:~$ automount_path_to_fifo: fifo name /var/run/autofs.fifo--
-bash: automount_path_to_fifo:: command not found
osmc@osmc:~$ lookup_nss_read_map: reading map file /etc/auto.nfs.shares
-bash: lookup_nss_read_map:: command not found
osmc@osmc:~$ do_init: parse(sun): init gathered global options: (null)
-bash: syntax error near unexpected token `('
osmc@osmc:~$ mounted direct on /mnt/NASFiles with timeout 15, freq 4 seconds
-bash: mounted: command not found
osmc@osmc:~$ do_mount_autofs_direct: mounted trigger /mnt/NASFiles
-bash: do_mount_autofs_direct:: command not found
osmc@osmc:~$ st_ready: st_ready(): state = 0 path /-
-bash: syntax error near unexpected token `('
osmc@osmc:~$ handle_packet: type = 5
-bash: handle_packet:: command not found
osmc@osmc:~$ handle_packet_missing_direct: token 7, name /mnt/NASFiles, request pid 3131
-bash: handle_packet_missing_direct:: command not found
osmc@osmc:~$ attempting to mount entry /mnt/NASFiles
-bash: attempting: command not found
osmc@osmc:~$ lookup_mount: lookup(file): looking up /mnt/NASFiles
-bash: syntax error near unexpected token `('
osmc@osmc:~$ lookup_mount: lookup(file): /mnt/NASFiles -> 192.168.1.210:/c/media
-bash: syntax error near unexpected token `('
osmc@osmc:~$ parse_mount: parse(sun): expanded entry: 192.168.1.210:/c/media
-bash: syntax error near unexpected token `('
osmc@osmc:~$ parse_mount: parse(sun): gathered options:
-bash: syntax error near unexpected token `('
osmc@osmc:~$ parse_mount: parse(sun): dequote("192.168.1.210:/c/media") -> 192.168.1.210:/c/media
-bash: syntax error near unexpected token `('
osmc@osmc:~$ parse_mount: parse(sun): core of entry: options=, loc=192.168.1.210:/c/media
-bash: syntax error near unexpected token `('
osmc@osmc:~$ sun_mount: parse(sun): mounting root /mnt/NASFiles, mountpoint /mnt/NASFiles, what 192.168.1.210:/c/media, fstype nfs, options (null)
-bash: syntax error near unexpected token `('
osmc@osmc:~$ mount_mount: mount(nfs): root=/mnt/NASFiles name=/mnt/NASFiles what=192.168.1.210:/c/media, fstype=nfs, options=(null)
-bash: syntax error near unexpected token `('
osmc@osmc:~$ get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 6 version 0x30
-bash: syntax error near unexpected token `('
osmc@osmc:~$ get_nfs_info: nfs v3 rpc ping time: 0.000000
-bash: get_nfs_info:: command not found
osmc@osmc:~$ get_nfs_info: nfs v2 rpc ping time: 0.000000
-bash: get_nfs_info:: command not found
osmc@osmc:~$ get_nfs_info: host 192.168.1.210 cost 0 weight 0
-bash: get_nfs_info:: command not found
osmc@osmc:~$ get_nfs_info: called with host 192.168.1.210(192.168.1.210) proto 17 version 0x30
-bash: syntax error near unexpected token `('
osmc@osmc:~$ get_nfs_info: nfs v3 rpc ping time: 0.000000
-bash: get_nfs_info:: command not found
osmc@osmc:~$ get_nfs_info: nfs v2 rpc ping time: 0.000000
-bash: get_nfs_info:: command not found
osmc@osmc:~$ get_nfs_info: host 192.168.1.210 cost 0 weight 0
-bash: get_nfs_info:: command not found
osmc@osmc:~$ prune_host_list: selected subset of hosts that support NFS3 over TCP
-bash: prune_host_list:: command not found
osmc@osmc:~$ mount_mount: mount(nfs): calling mkdir_path /mnt/NASFiles
-bash: syntax error near unexpected token `('
osmc@osmc:~$ mount_mount: mount(nfs): calling mount -t nfs 192.168.1.210:/c/media /mnt/NASFiles
-bash: syntax error near unexpected token `('
osmc@osmc:~$ >> mount.nfs: mount system call failed
mount: bad usage
Try 'mount --help' for more information.
osmc@osmc:~$ mount(nfs): nfs: mount failure 192.168.1.210:/c/media on /mnt/NASFiles
-bash: syntax error near unexpected token `nfs'
osmc@osmc:~$ dev_ioctl_send_fail: token = 7
-bash: dev_ioctl_send_fail:: command not found
osmc@osmc:~$ failed to mount /mnt/NASFiles
-bash: failed: command not found
osmc@osmc:~$ st_expire: state 1 path /-
-bash: st_expire:: command not found
osmc@osmc:~$ expire_proc: exp_proc = 4102591568 path /-
-bash: expire_proc:: command not found
osmc@osmc:~$ expire_cleanup: got thid 4102591568 path /- stat 0
-bash: expire_cleanup:: command not found
osmc@osmc:~$ expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
-bash: expire_cleanup:: command not found
osmc@osmc:~$ st_ready: st_ready(): state = 2 path /-
-bash: syntax error near unexpected token `('
osmc@osmc:~$ ^Xst_expire: state 1 path /-
-bash: :s^Xst_expire: state 1 path /-: substitution failed
osmc@osmc:~$ expire_proc: exp_proc = 4102591568 path /-
-bash: expire_proc:: command not found
osmc@osmc:~$ expire_cleanup: got thid 4102591568 path /- stat 0
-bash: expire_cleanup:: command not found
osmc@osmc:~$ expire_cleanup: sigchld: exp 4102591568 finished, switching from 2 to 1
-bash: expire_cleanup:: command not found
osmc@osmc:~$ st_ready: st_ready(): state = 2 path /-
-bash: syntax error near unexpected token `('
osmc@osmc:~$ ^Cdo_notify_state: signal 2
-bash: :s^Cdo_notify_state: signal 2: substitution failed
osmc@osmc:~$ master_notify_state_change: sig 2 switching /- from 1 to 5
-bash: master_notify_state_change:: command not found
osmc@osmc:~$ st_prepare_shutdown: state 1 path /-
-bash: st_prepare_shutdown:: command not found
osmc@osmc:~$ expire_proc: exp_proc = 4097832016 path /-
-bash: expire_proc:: command not found
osmc@osmc:~$ expire_cleanup: got thid 4097832016 path /- stat 0
-bash: expire_cleanup:: command not found
osmc@osmc:~$ expire_cleanup: sigchld: exp 4097832016 finished, switching from 5 to 7
-bash: expire_cleanup:: command not found
osmc@osmc:~$ st_shutdown: state 5 path /-
-bash: st_shutdown:: command not found
osmc@osmc:~$ umount_multi: path /mnt/NASFiles incl 0
-bash: umount_multi:: command not found
osmc@osmc:~$ set_direct_mount_catatonic: set /mnt/NASFiles catatonic
-bash: set_direct_mount_catatonic:: command not found
osmc@osmc:~$ umounted direct mount /mnt/NASFiles
-bash: umounted: command not found
osmc@osmc:~$ automount_path_to_fifo: fifo name /var/run/autofs.fifo--
-bash: automount_path_to_fifo:: command not found
osmc@osmc:~$ shut down path /-
-bash: shut: command not found
osmc@osmc:~$ autofs stopped
-bash: autofs: command not found

My new logs can be found at https://paste.osmc.tv/ijasebapug

Thanks again

What’s the output of showmount -e 192.168.1.210

/c/media *

Is there anything else I can try?

Does NASFiles/ exist? You should let autofs create it. fstab would have needed it created manually.

Is there a syntax error somewhere?

Hi,

My /etc/auto.master looks like this:

# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
#/net   -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
+dir:/etc/auto.master.d


# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse

With regards to whether NASFiles exists, yes, if I ls /mnt I see it listed, but if I try and cd into it I get No such file or directory. If I try and rmdir it, I get Device or Resource busy. I tried changing the mount point in auto.nfs.shares to NASMedia (which doesn’t exist), but it still doesn’t work.

Thanks

The only difference I have in auto.master is timeout 30 because my disk takes a while to spin up (longer than Windows or Kodi are prepared to wait).

My /etc/exports restricts access to the subnet (192.168.1.0/24) but I doubt that’s the problem.

How does your /etc/auto.nfs.shares look like?

/mnt/NASFiles   192.168.1.210:/c/media

And I don’t have an /etc/exports file. I tried upping the timeout to 30 but to no avail.

{pss}

[EDIT: Don’t realize user was using wireless nic, so also add 2nd option]

{whisper}
Add the options “x-systemd.automount” and “x-systemd.after=network-online.target” to your /etc/fstab config and it works without all the other futzing about…
{/whisper}

Server:/NASFiles /mnt/MASFILES nfs x-systemd.automount,x-systemd.after=network-online.target,{rest-of-options} 0 0

If you want to use a more global setting you can use the service systemd-networkd-wait-online. I did both

sudo systemctl enable systemd-networkd-wait-online.service

What is your NFS server? I assume Hanewin?

If I understand the question, the NFS server I am trying to mount is a ReadyNAS box.

Ok, that would explain the * as Readynas would give access to anyhost.
You might still want to try limit access to your IP range to see if that helps.
Also maybe for testing use in your /etc/auto.nfs.shares

/mnt/NASFiles1   192.168.1.210:/c/media

To avoid clash with your fstab entry.

I removed Any Host access to the share and setup root access for the IP of the Vero, though this did not change the output of showmount -e 192.168.1.210. I also changed the mount name as suggested (I had experimented with this before), but it still won’t mount…

Thats odd, maybe the NAS need a reboot of the service after change?

What does ls -lah /mnt now says?

total 8.0K
drwxr-xr-x  3 root root 4.0K Oct 25 16:18 .
drwxr-xr-x 20 root root 4.0K Aug  8 06:47 ..
drwxr-xr-x  2 root root    0 Oct 25 16:18 NASFiles1

I will try a reboot of the ReadyNAS, doesn’t always come back up when done remotely, in my experience

So what about ls -lah /mnt/NASFiles1/?
And after that again ls -lah /mnt/?