Configuring fstab based Samba share mounts


split this topic #29

A post was split to a new topic: Mount different shares for different profiles using the fstab


#30

I’m having trouble getting automount to work.
I tried:
//192.168.1.30/_movie-d /mnt/d cifs username=aaanmt,password=zzz,iocharset=utf8,sec=ntlm,vers=3.0 0 1

“mount -a” will manually mount the share.
Then finding this guide I updated fstab. Now mount -a doesn’t work (as intended), but I can do a “mount /mnt/d”
//192.168.1.30/_movie-d /mnt/d cifs x-systemd.automount,noauto,rw,iocharset=utf8,username=aaanmt,password=zzz,iocharset=utf8,sec=ntlm,vers=3.0,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0


#31

Hi,

I would try removing the the noauto, if that doesn’t work; please open a new topic.

Thanks Tom.


#33

Thanks Tom, that fixed it.


#34

Thanks to all,
I’ve been using this for ages but recently it stopped working. It may have been when Samba on my file server updated to 4.7.1 or it may have been an OSMC update. To cut a long story short I was seeing a load of:

Dec 26 08:56:57 osmc kernel: Status code returned 0xc0000017 NT_STATUS_NO_MEMORY
Dec 26 08:56:57 osmc kernel: CIFS VFS: Send error in SessSetup = -121
Dec 26 08:56:57 osmc kernel: CIFS VFS: cifs_mount failed w/return code = -121

in the journal. The solution was to add “domain={my_domain_or_workgroup}” to the options. In my case is is “domain=home” as I’ve set my workgroup to “home” on my Samba server.

HTH


split this topic #35

A post was split to a new topic: Unable to delete file with fstab mounted SMB shares


split this topic #36

A post was split to a new topic: Help with FSTAB SMB mounts


#37

I hadn’t twigged it only mounts when a program tries to access the FS. df doesn’t count!

I found just before the December update that sometimes playing files you would get an endless spinning circle/hour-glass. After it happened a few times I did some digging and found my windows 10 server would disconnect idle sessions after 15 minutes. And sometimes win10 would not respond to new requests correctly. After OSMC gives up 15 minutes later it starts a new connection which works.

I tried to extend the idle time but it still remained at 15 minutes. https://blogs.msdn.microsoft.com/openspecification/2013/03/19/cifs-and-smb-timeouts-in-windows/

I solved the timeout issue by installing “cron-app-osmc”. And told it to run “df” every 15 minutes, by adding to crontab:
*/15 * * * * df >/dev/null 2>&1


Vero 4K+ interface stops responding with autofs
#39

Hi, I would give the socket options SO_KEEPALIVE a try, see

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SOCKETOPTIONS

Means you modify /etc/samba/smb.conf on the OSMC device. But this could prevent some NAS from sleep.