NFS and SMB, Neither work well!

I have been using Hanewin NFS on my Win 10 Computer for years, because I was advised by people on here to go with NFS, now but it just doesn’t work correctly… or not at all…
It used to work fine, it hasn’t anymore for more than a year.

Before going into details, I use Comodo Firewall (even with it turned off or uninstalled it makes no changes) and Veracrypt for my disks (previously Bitlocker, on or off makes no difference), neither influence my connectivity but I want to mention them before someone says it might be that.

The big issue I have with Hanewin NFS that I can have 3 video files, all from the exact same quality and codec, but have 1 or 2 not approachable through my Vero. The strange thing is that it isn’t consistent.
Lets say I have video A, B, C, and D.mp4, right now video A, B, and D work perfect, but when I try to access video C it gives a library error, file not found.
When I go to the hosting Win 10 computer and try to play A, B, C and D all of them work.
Sometimes playing them in Win 10 helps them start on my Vero too but that is pretty rare.
Now the weirdest thing of it all. A, B and D can work just fine today while C does not, then tomorrow A, B, C, and D all work, but the day after only A and D work. It makes no sense.

If anything I want to fix this problem, it’s not my Hanewin, all connections seem to be good but loading them and checking the kodi log it says the NFS could not be opened, while it’s accessible for other things.
I contacted Hanewin and they could not find an issue with anything, it could only be the media player.

This is my complete hanewin export

# exports example
#
# please read doc for a list of all options
# drive letters should be in upper case, because file-id returns upper case
#   by default (option setting) they are mapped to lower case for clients
# Option -range restricts access to specified address range
#   a list of addresses restricts to these clients only
# Option -readonly prohibits create/write/delete
# Option -name:<x    makes folder for clients avalailable as /<x>
# Option -maproot:<uid    maps unix root to specified <uid>
#   without it uid root -    uid NOBODY
# Option -alldirs allows clients to mount folder or any subfolder
# Use UNC path specification for access to remote drive
# Hidden volumes without a drive letter can be mounted by volume GUID
#
#C:\ftp -range 192.168.1.1 192.168.1.10
#C:\video -readonly 192.168.1.1 192.168.1.4 192.18.1.23
#C:\server -alldirs -name:server -maproot:0 -range 192.168.1.1 192.168.1.30
#\\router\FRITZ.NAS\SanDisk-U3CruzerMicro-00 -name:fritz
#\\?\Volume{6afa3aa3-1b38-11e6-a140-0000fbaa0005}\ -name:drive1

t:\Shows     -readonly  192.168.1.106
v:\Movie     -readonly  192.168.1.106
r:\Anime     -readonly  192.168.1.106
t:\Shows     -name:Shows -readonly  192.168.1.105
v:\Movie     -name:Movies -readonly  192.168.1.105
r:\Anime     -name:Anime -readonly  192.168.1.105
q:\Audiobooks -name:Audiobooks -readonly  192.168.1.108
u:\Movies -name:Films -readonly  192.168.1.105
u:\Movies -name:Films -readonly  192.168.1.106

I tried turning UDP off and INODE reset on in Hanewin but that does not help either. I use the latest version but have had this problem for a long time.

Out of desperation I tried to move from NFS to SMB because a mod on here said it would work just as well. I configured it in my firewall and nothing is blocked anymore, when I go to my own \ip on my computer\ I can reach my files but when I try to connect to SMB on my OSMC I get Error 2 no connection found so I can’t access my media through that way either.
I tried everything I could think of, for weeks now. Following guides and advice.
I have no password set on my Win 10, I turned off password requirement in windows Advanced Sharing (the 128 bit encryption is still on but without a password) and I have no real username (and it doesn’t ask for it when I try to browse the shares on the Win device either).
I’m not a huge tech guru so I might need a step by step (including how to properly share) guide but I don’t think I messed up.

I have 2x Vero 4K+, a normal Ver and a Raspberry Pi 3 running but none of them work properly, the best working devices are on NFS, but half of the files don’t play most of the time so I have to wait until they do again, it’s completely random.

Ok, let’s start with the basics.
Log into one of your OSMC machines with SSH and do:

  1. Install smbclient sudo apt-get install smbclient
  2. smbclient -U osmc -L <IP of the Win10>

And post the output here.

osmc@osmc:~$ smbclient -U osmc -L 192.168.1.106
WARNING: The “syslog” option is deprecated
Enter osmc’s password:
protocol negotiation failed: NT_STATUS_CONNECTION_RESET

Ok, first what is the user you configured on the Win10 for the share? I just assumed it is osmc but might be different?
But protocol negotiation failed we might overcome with setting smb3.

smbclient -m SMB3 -U <USER on Win10> -L 192.168.1.106

I think I set it to “everyone” in the setup instead of a user and removed the password option because it’s a closed network.

“everyone” still need a “user”. Guest SMB access is not supported.
I suggest to just create a local OSMC user with password on the Win10 machine as it is the cleanest approach.

Ok where do I go from here on Win 10? (OS is in english) and how do I avoid it from being detected as an active user I need to prompt every startup?

From Create a local user or administrator account in Windows - Microsoft Support

Create a local user account

  • Select the Start button, select Settings > Accounts and then select Family & other users. (In some editions of Windows you’ll see Other users .)
  • Select Add someone else to this PC .
  • Select I don’t have this person’s sign-in information , and on the next page, select Add a user without a Microsoft account .
  • Enter a user name, password, password hint or choose security questions, and then select Next .

Did you open a post or support ticket about this that I’ve missed? I’d like to catch up on any details.

Both SMB and NFS should generally work well enough so it would be good to get some background about the motivation between moving from the former to the latter

Cheers

Sam

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?)