NFS and SMB, Neither work well!

Done both, username is OSMC.
What should I do with the shares now?

Hey Sam, I never opened a ticked but I did talk about it with you a long time ago, I made several posts since about the same subject but I’ve never been able to get it right. Not even with the help from anyone on here so far.
It’s just really weird, especially since the NFS works… but not always, and not with everything, while on another moment it does work, but doesn’t work with the thing that worked an hour ago. While all files are always accessible on the host machine.

Perfect than run
smbclient -m SMB3 -U osmc -L 192.168.1.106

If NFS is problematic as well as SMB then it’s possible there’s a network connectivity problem overall, and I’m not sure that using SMB would mitigate this.

Ideally, you’d want to solve the dropouts. Using something like autofs may be sufficient for mitigating such an issue but it would be better to get the root cause solved.

I’m confident that we can get this resolved for you, or at least rule out any issues on the OSMC side and suggest further where we should look (possibly the network).

Have you tested the basic network connection using iperf3?

Connection to 192-.168.1.106 failed (Error NT_STATUS_UNSUCCESSFUL)
osmc@osm:~$ smbclient -m SMB3 -U osmc -L 192.168.1.106
WARNING: The “syslog” option is deprecated
Enter osmc’s password:
Domain=[DESKTOP] OS= Server=

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Remote Admin
    Anime           Disk
    C$              Disk      Default share
    IPC$            IPC       Remote IPC
    Movie           Disk
    Movies          Disk
    Shows           Disk

Connection to 192.168.1.106 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled – no workgroup available
osmc@osmc-:~$

I hope so, but the weird thing is, the network is pretty much bare at the moment. I have turned every form of sercurity off and have a brand new router directly connected from Host to Devices so I can’t find the issue there either!

No, iperf3 wasn’t in my vocabulary yet haha.

Ok looks good at first sight.
Now question is how you want to mount the folders on your OSMC device. My suggestion would be autofs.

Maybe just try your Movies shares first, you smb.shares could look like

/mnt/Movies -fstype=cifs,rw,vers=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.106/Movies/

I think I made an attempt with NFS in autofs, or fstab, I’m not sure which one again. What are the basic commands to check if there aren’t any redundant mounts that don’t work in either of those?

Then the autofs you just mentioned.

sudo nano /etc/auto.master
with /- /etc/auto.smb.shares --timeout 15 browse at the end of the file.

then sudo nano /etc/auto.smb.sharesand add /mnt/Movies -fstype=cifs,rw,vers=3.0,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.106/Movies/

am I right?

also this on install

Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  autofs
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 411 kB of archives.
After this operation, 2047 kB of additional disk space will be used.
Get:1 http://ftp.debian.org/debian stretch/main armhf autofs armhf 5.1.2-1 [411 kB]
Fetched 411 kB in 0s (442 kB/s)
Selecting previously unselected package autofs.
(Reading database ... 25624 files and directories currently installed.)
Preparing to unpack .../autofs_5.1.2-1_armhf.deb ...
Unpacking autofs (5.1.2-1) ...
Setting up autofs (5.1.2-1) ...

Creating config file /etc/auto.master with new version

Creating config file /etc/auto.net with new version

Creating config file /etc/auto.misc with new version

Creating config file /etc/auto.smb with new version

Creating config file /etc/autofs.conf with new version

Creating config file /etc/default/autofs with new version
Created symlink /etc/systemd/system/multi-user.target.wants/autofs.service -> /lib/systemd/system/autofs.service.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for systemd (232-25+deb9u12) ...

Well check auto.fs and fstab. Easiest just share content so that we can review

paste-log /etc/fstab
paste-log /etc/auto.master

That warning should be fine, but it means you didn’t had it before so only need to check fstab conflicts.

You steps are ok, just one more step add user/password to /home/osmc/.smbcredentials

https://paste.osmc.tv/dupegakuji

https://paste.osmc.tv/anuxaqabeh

added
Username=OSMC
Password=password
to my sudo nano ~/.smbcredentials

Ok you have your NFS mounts in FSTAB but they will not interfere as they use different names.
question is if you just first one to do some testing with SMB or directly use the same mount folders as for NFS? (BTW using : in folder names is not really suggested as certain OS might get confused).

Ok, looks good. So suggest to reboot and the check ls -lah /mnt/Movies

I can get rid of the NFS all together if it will work just as fast and without flaws for once with SMB (I play 720p/1080p lossless 5.1 DTS at max, on a rare occasion something 4k).
The : is something Hanewin did.it converted the letters of the drives too and added that. You could toggle it off but it didn’t seem to make a difference.

After a restart it doesn’t look good.

osmc@osmc-:~$ ls -lah /mnt/Movies
ls: reading directory ‘/mnt/Movies’: Permission denied
total 0

My password in credentials is generated (50 chars with 's and the likes, could that cause it?)

Permission denied is strange.
Lets go to the testing. Open a second SSH window

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

And then run again in the other window ls -lah /mnt/Movies and post what comes up in the other window.

Also just to ensure no issue send paste-log /etc/auto.smb.shares

Shouldn’t but might be worse for testing to configure an easier one.

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.smb.shares
do_init: parse(sun): init gathered global options: (null)
mounted direct on /mnt/Movies with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/Movies
st_ready: st_ready(): state = 0 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-

I’m stuck in a loop of that.

So the ls still reports permission denied?

I tried to ctrl+z out of it but doesn’t work, it just keeps throwing hte last couple of lines.

expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-
^Zstatemachine:1500: got unexpected signal 20!
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-

Use CTRL-C to exit.

Please share this:

paste-log /etc/auto.smb.shares

Thanks that got me out of it.

https://paste.osmc.tv/etucarimuf

OK, that looks fine. For testing, can you comment out all the lines in your fstab (the ones you added staring with 192.) Just put a # in front of them and reboot.

The colons in there may be confusing things and the last line is completely wrong, so lets make sure fstab isn’t causing any problems.

https://paste.osmc.tv/afoheloway

Removed it all, the fstab didn’t work anyway, was just a futile attempt I made myself.

But still failing

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.smb.shares
do_init: parse(sun): init gathered global options: (null)
mounted direct on /mnt/Movies with timeout 15, freq 4 seconds
do_mount_autofs_direct: mounted trigger /mnt/Movies
st_ready: st_ready(): state = 0 path /-
st_expire: state 1 path /-
expire_proc: exp_proc = 1948251216 path /-
expire_cleanup: got thid 1948251216 path /- stat 0
expire_cleanup: sigchld: exp 1948251216 finished, switching from 2 to 1
st_ready: st_ready(): state = 2 path /-