Setup: Three RPis (one Rpi2, two Rpi3), all connected wirelessly to a router Asus RT-AC66U_B1. Previously I had a small 250 HDD attached to one of the RPi and other devices accessed the files on the disk via NFS share. I have now bought a bigger 2 TB disk and decided to attach it directly to the router for better throughput. Now the available services on router are UPnP/FTP/Samba (I’ve enabled them all). When enabling the Samba, there was this little warning:
Note: If you are using Windows® 10, use this FAQ to enable SMBv1 Client to ensure you have access to files stored within the network.
I didn’t pay much attention as the primary aim was to access the files from those RPis. At first all seem to work great, but then I ran into couple of movies which started playing as usually but the playback was terminated within 1-3 seconds… Not all of them, only some files. That’s when I recalled the warning, so I headed to Kodi settings and in the Services - Samba client put the Max protocol version to v1. After the reboots all 3 RPis were again capable to play everything from that Samba share.
A week later I turned on my TV and there was some error that backup upload failed… I tried to experiment with Samba protocol settings and it seems that with v3/v2 there’s no issue uploading the files to Samba, but using the v1 version always fails:
2020-01-25 15:50:21.879 T:1915819568 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://ROUTER/osmc_backup' unix_err:'d' error : 'Permission denied' 2020-01-25 15:50:49.150 T:1915819568 NOTICE: NFS is idle. Closing the remaining connections. 2020-01-25 15:51:00.860 T:1915819568 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://USERNAME:PASSWORD@ROUTER/osmc_backup/loznice/1 2020-01-25 15:51:18.955 T:1763701472 WARNING: CPythonInvoker(14): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version. 2020-01-25 15:51:22.257 T:1702863584 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://USERNAME:PASSWORD@ROUTER/osmc_backup/loznice/temp_write_test 2020-01-25 15:52:56.566 T:1915819568 NOTICE: Samba is idle. Closing the remaining connections 2020-01-25 15:57:36.895 T:1702863584 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://USERNAME:PASSWORD@ROUTER/osmc_backup/loznice/OSMCBACKUP_2020_01_25_15_51_22.tar.gz 2020-01-25 16:13:39.410 T:1702863584 ERROR: Copy - Failed write to file smb://ROUTER/osmc_backup/loznice/OSMCBACKUP_2020_01_25_15_51_22.tar.gz
In fact the file exists and is created but with 0 B size…
Even stranger thing is that in OSMC backup settings I can browse to osmc_backup folder on Samba and I created the folder “loznice” from that very RPi which then later failed to upload the backup. I also noticed several Addons which have the possibility to save the media performing in the same way – file gets created but then there’s the write error in logs.
I can probably think of some workaround – use UPnP/FTP for video files and Samba for Addons using e.g. .strm files OR backup to local SD card and upload with some CRON task afterwards using FTP/SCP but one thing makes me wonder: when you setup the media sources, it’s possible to define NFS, SMB, FTP, SFTP/SCP, but when you configure the Backup location, the options are local, SMB or NFS. Why is the FTP/SCP missing? I’m not sure if the problem is in router OS (as there all the shares are R/W) or it’s something inside Samba v1 protocol, or if the problem is on OSMC/Raspbian side…