NFS and SMB, Neither work well!

Well I think it is well explain in the second section in that thread.

Can you from OSMC showmount -e 192.168.1.106
Also what is the IP of your OSMC box you are currently working with?

First change /etc/auto.master to remove the smb entry and add

/- /etc/auto.nfs.shares --timeout 15 browse

Then sudo nano /etc/auto.nfs.shares and add /mnt/Movies 192.168.1.106:/u:/Movies

This might work while I am not sure about the colon in your share name.

To make things easier for me (and maybe you too) I turned my host into 192.168.1.120 temporarily and I changed all the boxes from random 103-105 to 114, 115 and 117, with the PI as 116 because I’m messing with that one right now and I’d rather screw up my Pi than my vero haha.

I also changed the Hanewin export accordingly.

showmount will be slightly different because they are all static leases temporarily.

The lease for the pi i’m currently working on will be 116

osmc@osmc:~$ showmount -e 192.168.1.120
Export list for 192.168.1.120:
/t/Shows 192.168.1.116,-readonly
/v/Movie 192.168.1.116,-readonly
/r/Anime 192.168.1.116,-readonly
/Films 192.168.1.116,-readonly
.
I replaced smb with nfs in auto.master.

I created a new file named /etc/auto.nfs.shares (didn’t exist) and added /mnt/Movies 192.168.1.116:/u:/Movies (116 is my pi ip, the PC is 120).

Anything I can do to test?

Not to interrupt @fzinken

but as you mentoined NFS host is 120, i guess you should be 120, instead of 116, cause that is the clients IP.

furtermore it seems to continue with:

Testing the config:
After you have made the changes restart autofs:

sudo systemctl restart autofs

To test if your mounts works execute:

ls -lah /mnt/<server1>/<share1>

you should see the files from your network share. If it didn’t work run

sudo systemctl stop autofs
sudo automount -f -v -d

to debug what’s wrong. While this is running, it will appear to keep trying to mount. That’s normal. While automount is running, open another SSH connection and try:

 ls -lah /mnt/<server1>/<share1>

again while watching the output from the automount command.

To exit if running automount, just do a CTRL-C. To restart the service once everything is working, either reboot or:

sudo systemctl start autofs

Ok based on your showmount output I can not see “U” being shared and also the : as I expected is removed.
So lets use v for testing. The line in auto.nfs.shares should be
/mnt/Movie 192.168.1.120:/v/Movie

Thank you I tend to screw up anyway haha.
I changed the /etc/auto.nfs.shares to /mnt/Movies 192.168.1.120:/u:/Movies which is the host.

Ok but this is where I usually rope myself, /mnt/<server1>/<share1> in this case would that be /mnt/192.168.1.120:/u:/Movies ?
I have no idea what I’m doing when it comes to this.

Please check my correction based on your showmount output.

So that means adding /mnt/Movie 192.168.1.120:/v/Movie to /etc/auto.nfs/shares? Next to the already existing /mnt/Movies 192.168.1.120:/u:/Movies?

edit, ah i see, remove the :

As @fzinken already replied it should be

/mnt/Movie 192.168.1.120:/v/Movie

and then with the other steps in the link of @fzinken you should test it, see my lines which are from this link. As you need to restart autofs

Remove the line with /mnt/Movies 192.168.1.120:/u:/Movies for the time being. We just want one test to work first before we do clean additions of all.

OK /etc/auto.nfs.shares now only contains /mnt/Movie 192.168.1.120:/v/Movie

then sudo systemctl restart autofs and try ls /mnt/Movie/

ls /mnt/Movie/
ls: cannot access ‘/mnt/Movie/’: No such file or directory

Please paste

paste-log /etc/auto.master
paste-log /etc/auto.nfs.shares

https://paste.osmc.tv/tokudarawo

https://paste.osmc.tv/ebozijayan

from which IP are you connecting?
did you gave this IP access inside Hanewin to the mentioned resource?

Can you show the output of sudo systemctl status autofs

Also lets go back to testing and in a second window run this and the do the ls /mnt/Movie

sudo systemctl stop autofs
sudo automount -f -v -d

Well he said

and the showmount showed

then it should be correct :wink:

from my nas it happened the first time as well, and then it seems the incorrect permissions are on the folder. So therefor I was asking

Within Hanewin you can also look if you’re connected
haneWIN NFS Server Dokumentation and then registrations or even check directories

120 is my host, 114-117 are my boxes and yes I changed the hanewin information accordingly :slight_smile:

sudo systemctl status autofs

  • autofs.service - Automounts filesystems on demand
    Loaded: loaded (/lib/systemd/system/autofs.service; enabled; vendor preset: e
    Active: active (running) since Wed 2020-05-13 14:07:42 CEST; 11min ago
    Process: 2925 ExecStart=/usr/sbin/automount $OPTIONS --pid-file /var/run/autof
    Main PID: 2926 (automount)
    CGroup: /system.slice/autofs.service
    `-2926 /usr/sbin/automount --pid-file /var/run/autofs.pid

May 13 14:07:42 osmc- systemd[1]: Starting Automounts filesystems on dema
May 13 14:07:42 osmc-automount[2926]: do_mount_autofs_direct: failed to
May 13 14:07:42 osmc- systemd[1]: Started Automounts filesystems on deman

[17]+ Stopped sudo systemctl status autofs
osmc@osmc-:~$ ls /mnt/Movie
ls: cannot access ‘/mnt/Movie’: No such file or directory
osmc@osmc-:~$

in the second window

sudo automount -f -v -d
Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.03
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(dir): dir map /etc/auto.master.d missing or not readable
lookup(file): failed to read included master map dir:/etc/auto.master.d
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
lookup_read_master: lookup(file): read entry /-
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)
do_mount_autofs_direct: failed to create mount directory /mnt/Movie
st_ready: st_ready(): state = 0 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1949299792 path /-
expire_cleanup: got thid 1949299792 path /- stat 0
expire_cleanup: sigchld: exp 1949299792 finished, switching from 2 to 1

Was there anything written after failed to?