Suggested share services for WinPC & Kodi use

gggr

Cadet
Joined
Mar 28, 2023
Messages
8
Hello all,

Looking for suggested / best practice methods to setup TrueNAS Scale for my needs. Main desire is to set up something that is robust and reliable.
The docs hub is great for explaining what can be done but obviously doesn't tell you what to do. I suspect there are many ways to achieve what I am wanting so I am hoping for a push in the right direction. I've followed through the uncle fester guide as best I can but it is a bit outdated with the latest version.

Basic use of the TrueNAS will be to back up personal files from Win10 PC and serve media files to Kodi (Kodi is running via libreelec on a separate intel NUC).
The media files originate on the WinPC where it is organised and kodi metadata is managed, so I need to sync from WinPC to TrueNAS, and then serve files to kodi (i.e. there is a 1-to-1 copy between WinPC and TrueNAS).
Everything is on the local network, and I don't need any realtime or automatic sync, happy to run it manually as needed. I don't strictly need to mount the TrueNAS shares on the WinPC.

For the task of syncing from WinPC to TrueNAS would it make sense to use rsync? I could set up a batch file or just keep a .txt file with the required args. My understanding is this would involve running rsync on the WinPC which would then sync via SSH.

The kodi wiki is down right now due to a data breach but the archived version is available. Kodi supports SMB and NFS among other options (Kodi wiki: File sharing). My understanding is that NFS is generally faster and less resource intensive than SMB so I am inclined to use it for the media dataset to serve to Kodi. Note it looks like NFSv4 support has only recently been added to Kodi so I would just use NFSv3.
I am aware from reading other threads that I will need to enable "allow non-root mount" but it seems like it should otherwise work out of the box?

Does this all seem reasonable?

So the steps to set this up would be along the lines of:
Create dataset 'media'
Set up NFS share for 'media' dataset (generally using default settings?)
Enable SSH service (initially use password but look at setting up keys eventually)
Create user 'WinPC' and allow ssh login (note: how do I know which shell type to select - is this based on the ssh app I would use on windows??)
Create user 'Kodi'
Give user 'WinPC' read/write access and user 'Kodi' read only access to 'media' dataset
Run in cmd on WinPC something along the lines of:
Code:
rsync -v -a -H -h --inplace /cygdrive/I/media/ winpc@192.168.0.xx:/mnt/media/media/

Access NFS share on kodi via nfs://192.168.0.xx:/mnt/media/media/

Any tips or suggestions appreciated.
 

gggr

Cadet
Joined
Mar 28, 2023
Messages
8
Above seems to be working, except I cannot get rsync to work.

I can ssh into the server just fine from the windows CMD, using ssh keys generated on the windows PC.
But trying to achieve anything via rsync gives an error:
Code:
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(228) [Receiver=3.2.3]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(228) [sender=3.2.3]


I suspect it has to do with rsync not finding or accessing the private key saved locally, but honestly am not sure and have tried a few options.

Fortunately rclone seems to work just fine out of the box.
Not sure if that is the fastest way to get it going but seems reliable?
 
Top