Jump to content

Emby doesn't write metadata together with the media (NAS+RPi4)


Recommended Posts

0v3rl0rd
Posted (edited)

So, what I have is a NAS with a shared folder (//192.168.1.100/NASdrive1) and a Raspberry Pi 4 with Emby server installed. 

On the Raspberry Pi4 I mounted the NAS folder using FSTAB: 
//192.168.1.100/NASdrive1 /home/pi/0_test_mount_point cifs credentials=/home/pi/.smbcredentials,file_mode=0777,dir_mode=0777,gid=1000,uid=1000,_netdev  0  0

And I can write normally: from within Linux, from SSH, and from Win10 (if I mount the same folder again in Win10 PC), no problems with that. 

But, another problem turned up - EMBY. 
It is set up so that it should save all the metadata inside the movies folders (on the mounted NAS drive) - but instead it saves the metadata on the RPi itself. 
It seems to me that it cannot write to the mounted NAS drive. 

I also added user "emby" to "sudo" group.

Any info? 

PS, I know I can set the Emby up on the NAS itself, but that's not the point :)

embypost.png

Edited by 0v3rl0rd
Posted

Hi there, have you taken a look at this?

 

0v3rl0rd
Posted (edited)
On 5/4/2022 at 7:26 PM, Luke said:

Hi there, have you taken a look at this?

 

Hi, 

Thanks for the link - I took a look, and I mounted the NAS folder as emby/emby: 

//192.168.1.100/NASdrive1 /home/pi/0_test_mount_point cifs credentials=/home/pi/.smbcredentialsD,gid=995,uid=999,_net>

drwxr-xr-x 2 emby emby    0 Apr 23 21:48 movies
drwxr-xr-x 2 emby emby    0 May  6 17:11 test
drwxr-xr-x 2 emby emby    0 May  5 17:06 test2
-rwxr-xr-x 1 emby emby    6 May  4 10:49 test.txt

 

I also tried to put metadata in one folder on the same shared NAS drive (metadata path):

/home/pi/0_test_mount_point/metadata

But with no success. 

When I point the metadata path to a local directory (/home/pi/METADATA) and add the user "emby" to "pi" group, it normally writes to that local folder. 

But it just cannot write to a mounted NAS drive - I added user "emby" to the groups "pi" and "sudo" & I made the mount using both "gid=995,uid=999" for "emby" user and "gid=1000,uid=1000" for "pi" username. But with no success 😕

Edited by 0v3rl0rd
0v3rl0rd
Posted
On 5/13/2022 at 2:50 PM, Luke said:

@0v3rl0rd did you find the solution?

Nope, no progress at all. I tried all that I could think of - added emby to "sudo" group, added emby to "pi" group, changed the permissions to ALL R&W, mounted as root, mounted as pi, mounted as emby, etc... no changes at all 😕 
I'll do a clean OS & emby install and try everything from scratch... 

HtRabbit
Posted (edited)

I mount the my remote files with nfs. solves all client side issues

Fstab entry

192.168.0.90:/volume1/Videos /volume1/Videos nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0

 

Edited by HtRabbit
update info
Happy2Play
Posted

My guess would the nobrl issue but @Q-Droidmay be able to confirm.

 

Q-Droid
Posted
9 hours ago, Happy2Play said:

My guess would the nobrl issue but @Q-Droidmay be able to confirm.

I think so too. The option nobrl appears to be the one thing missing from the mount entry. I would also recommend using the UID/GID for the Emby runtime user, whether that's emby:emby or another.

 

  • 2 weeks later...
0v3rl0rd
Posted
On 5/18/2022 at 3:27 AM, Happy2Play said:

My guess would the nobrl issue but @Q-Droidmay be able to confirm.

 

 

On 5/18/2022 at 1:09 PM, Q-Droid said:

I think so too. The option nobrl appears to be the one thing missing from the mount entry. I would also recommend using the UID/GID for the Emby runtime user, whether that's emby:emby or another.

Thanks for the link and the info. I changed fstab to this: 

//192.168.1.100/NASdrive1   /home/pi/0_test_mount_point cifs credentials=/home/pi/.smbcredentials,rw,uid=999,gid=995,nobrl,file_mode=0664,dir_mode=0755 0 0 

Although it now works, truth be told I don't know what neither of these do: 
- added "rw" 
- added "nobrl" 
- changed file&dir mode to: file_mode=0664,dir_mode=0755 >> I know what this does, but why does it have to be set up exactly this way :D

  • Thanks 1
Q-Droid
Posted
1 hour ago, 0v3rl0rd said:

 

Thanks for the link and the info. I changed fstab to this: 

//192.168.1.100/NASdrive1   /home/pi/0_test_mount_point cifs credentials=/home/pi/.smbcredentials,rw,uid=999,gid=995,nobrl,file_mode=0664,dir_mode=0755 0 0 

Although it now works, truth be told I don't know what neither of these do: 
- added "rw" -- mount in read/write mode, the default so it shouldn't make a difference
- added "nobrl" -- no byte-range lock. disables this locking mechanism which is the one causing most problems on SMB shares and .Net file operations. We don't know if the newer .Net does a better job with this and the option wouldn't be needed after Emby release 4.7.x.
- changed file&dir mode to: file_mode=0664,dir_mode=0755 >> I know what this does, but why does it have to be set up exactly this way :D -- It doesn't have to be exactly this way. It's good general practice to not make all new files world readable, writeable and executable. same for world readable and writeable directories. you can change it to suit your needs.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...