SOLVED Plex won't allow its data path to be SMB shared

jwong858

Dabbler
Joined
Nov 25, 2022
Messages
28
Hello!

I'm building a new Truenas Scale server with 22.12-RC1. It's almost done except that I ran into an issue where Plex/Docker won't let its data path or the subdirectories to SMB shared. Here are the errors:

Nov 26 16:15:22 truenas dockerd[7797]: time="2022-11-26T16:15:22.172278717-08:00" level=error msg="Handler for POST /v1.41/containers/create returned error: invalid volume specification: '/mnt/data/Multimedia:/data': Invalid mount path. /mnt/data/Multimedia. Following service(s) uses this path: `SMB Share`."

I even named the share differently, but that didn't make any difference. It works as soon as I remove the SMB share. Any ideas?

Thanks,

James
 

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35
This is by design now. I stop Plex and re-enable the share to copy files in. Then disable the share and start Plex back up.

I may go back to running Plex in a VM.
 

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35

jwong858

Dabbler
Joined
Nov 25, 2022
Messages
28
Would running Plex under VM have storage performance impact, because the storage can't be accessed by the VM directly and must be accessed via some network protocols such as NFS or SMB?
 

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35
I don’t think it would be a problem or create a noticeable change. I ran Plex in hyper-v on windows before and it accessed a windows share for data. It worked fine. I wasn’t running benchmarks though.

With TrueNAS you will need to create a network bridge so the VM is able to see the shares.
 

browntiger

Explorer
Joined
Oct 18, 2022
Messages
58
My Plex is set to SMB share. Permissions are nor well though off [but I never had a chance to rethink them]. But it works just fine ...
Used TrueCharts deployment with near 0 changes. The only thing I did was mapped my SMB share folder HostPath (must be accessable by group apps or user apps ) to something like /data in addition to PVC with 256Gi. When you start just add a library pointed to your /data.

There is NO reason to use "bridge" or switch to VM. Kubernetes (used by TrueNas) have mandatory supported objects: "volumes".
These objects are specifically designed to provide access to the external storage.
 

Attachments

  • Screenshot 2022-11-27 215006.jpg
    Screenshot 2022-11-27 215006.jpg
    37 KB · Views: 4,741
Last edited:

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35
My Plex is set to SMB share. Permissions are nor well though off [but I never had a chance to rethink them]. But it works just fine ...
It will stop working in 22.12. Mine was working fine in Angelfish too.
 

browntiger

Explorer
Joined
Oct 18, 2022
Messages
58
What do you think I am running?
 

Attachments

  • Screenshot 2022-11-27 215202.jpg
    Screenshot 2022-11-27 215202.jpg
    49.5 KB · Views: 4,919

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35
What do you think I am running?
Sweet. I wonder how that is working? They stated it’s blocked. Are you enabling the share after you get the Plex app started?
 

browntiger

Explorer
Joined
Oct 18, 2022
Messages
58
Sweet. I wonder how that is working? They stated it’s blocked. Are you enabling the share after you get the Plex app started?
>They stated it’s blocked.
Who?

>Are you enabling the share after you get the Plex app started?
No

I map a folder under the SMB share. Not the share itself. /Public is an SMB share. /Public/Movies mapped as /data

And I don't see why would someone even try to disable this. One can always make a path so complicated under Linux, one would loose their mind checking. Like with Linux soft or hard links, where parent folder is not the same as a starting with "..". Most developers would loose their minds accounting for all combinations and give up.
 
Last edited:

cwagz

Dabbler
Joined
Jul 3, 2022
Messages
35
>They stated it’s blocked.
Who?

>Are you enabling the share after you get the Plex app started?
No

I map a folder under the SMB share. Not the share itself. /Public is an SMB share. /Public/Movies mapped as /data
There are at least two other threads. In the one I mentioned above truecharts says it was changed to prevent issues. There is another thread that had some work around like enabling the share after starting the app.

I was mapping the share itself. Interesting that mapping a folder inside the share is working. I wonder if that is the intended way to do it in Bluefin or just something they missed?
 

jwong858

Dabbler
Joined
Nov 25, 2022
Messages
28
I created a folder and a syslink to the Plex data directory. I then share it through SMB, but the syslink is not visible in the SMB folder. I guess SMB ignores syslinks.

I also thought about creating a VM, but then I still need to share the Plex data directory on the Truenas server. So, this is not going to work either.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I wonder if that is the intended way to do it in Bluefin or just something they missed?
I suspect it's something they missed. The concern I've seen, at least from @truecharts, is that mounting directories with ACLs as host paths risks problems, the nature of which I don't recall. The assumption--because this is the default behavior on TrueNAS--is that SMB shares will have ACLs rather than standard Unix permissions. I can't imagine this would be any less an issue with a subdirectory of a share than with the shared directory itself.
 

browntiger

Explorer
Joined
Oct 18, 2022
Messages
58
I re-read the issue, it is NOT @truecharts - it is IX who is disabling it. Personally I think not using top share folder immensely better because: You can see the mount point in Your Kubernetes pod - and if you can NOT read it, you know it is the permissions or ACLs. I would agree with IX, would not like SMB share/NFS share and root of mount point (k8s volume) to be the same. All sort of issues where kubernetes master node may keep scheduling restarts. But don't see an issue with subfolders. The worst thing that could happen: user will see the volume and have no access to files.

The ACLs are always a bane, even the experienced users get screwed. When I did my time, I had a user crying because they could not figure out why they have all permissions but could not rename or edit a critical file. [Of course same user thought that the file is critical and protected it, later forgot how.] You can not completely protect users from doing something stupid.

Still learning TrueNas. I would like to learn how to setup a CATALOG like truecharts?
I am pretty comfortable now on updating through the k3s or helm.
 
Last edited:

mgoulet65

Explorer
Joined
Jun 15, 2021
Messages
95
Am I interpreteing this correctly? When this is being enforced, I cannot use a Hostpath that is itself an SMB share, but I can use a Hostpath that is a folder within a data set that is SMB shared? i.e. I can't use /Tank/SMB but I can use /Tank/SMB/Folder?
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
This will be better documented at release, but to access an App dataset via SMB or NFS you need to disable host path validation in Kubernetes settings. This is a new "safety" feature in Bluefin. Some Apps are not very compatible with SMB sharing...


image.png
Kubernetes-Settings-Bluefin.png
 

TimB

Cadet
Joined
Dec 20, 2022
Messages
3
I wonder if it would be possible in a future release to allow overriding the path validation per mount when configuring a container? This way most of the time the safety check will be done except for when it's the exception.
 
Top