Apps Host Path access problem with SMB

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
So what is the solution or general censes of what to do?
I updated the SMB Shares section of this thread, with the iX Systems recommended solution to apply. Read the section guide, note this part:
To avoid any hostPath conflicts, set your SMB share to /mnt/software/opt and your application hostPath to /mnt/software/opt/media.
If your dataset contains files larger than 5MB, make sure to adjust the recordsize to 1MB. More details into Pools and Datasets section of same guide.
 

madsci1016

Dabbler
Joined
Dec 31, 2022
Messages
12
UGH This issue just cost me hours today. New to Truenas, new to kubernets or however you spell it, i'm a linux newb but i can rm -rf my root like the best of the newbs. Was liking how almost everything 'just worked' at my level setting Truenas up the past week (migrating from WS 2019 bare metal), except the official plex app just wouldn't load after i configure my folder pass throughs. I struggled to find logs as to why; since the "app logs" were blank.

Yes, there are newbs out there that want a SMB share of our movies folder and also pass the same folder to plex to scan, and we want it to just work.

Sorry, i know this is just a vent post, i'm hoping it adds to the pressure to resolve this "bug". Also impressed the "suggested topics" on this forum correctly pointed me here based off a few words in my 'would be' help me post. But we do live in the age of chatGPT don't we.
 

Sasquatch

Explorer
Joined
Nov 11, 2017
Messages
87
unless I made an error, I don't see a path forward with TrueNAS.
most people will want an SMB share to their media files. How will they give plex/tdarr/ access to it?
NFS share... even windows can mount NFS shares, and it's noticeably faster than SMB...MacOS too, only use for smb shares for me would be android phone access, but i'm pretty sure there is an app for that too, jut didn't look for it yet...
 

Sine

Cadet
Joined
Apr 15, 2022
Messages
5
The workaround that's been proposed (i.e., use one or more subdirectories of the shared directory as the host path) relies, IMO, on a bug in the validation--if the dataset uses ACLs, any of its subdirectories will as well, so the same risk is present. IOW, the validation should kick this back the same as it does when you try to mount the share itself as a host path. But it doesn't right now, so at least for now, the workaround works.

Well, it was anyways ... 22.12.1 'fixed' that glitch.

I'm not sure how to approach this, surely there are many use-cases where an app needs to write to a share.
 

oblivioncth

Explorer
Joined
Jul 13, 2022
Messages
71
Well, it was anyways ... 22.12.1 'fixed' that glitch.

I'm not sure how to approach this, surely there are many use-cases where an app needs to write to a share.
This is being discussed all over the place now of course, but your main options at this time are:
1) Use TrueCharts apps exclusively for your charts that also need their data network shared and mount the the data in to the container via NFS
2) Disable Host Path validation globally (not recommended)
3) Wait Until Cobia comes out later this year where they are working to make the service check (i.e. SMB, etc) portion of Host Path validation able to be disabled on a per app basis, which is much less severe of a measure to take.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
NFS share... even windows can mount NFS shares, and

I could be missing some new solution. But, from what I've read, you have to mount the share via CLI after changing the registry to reflect the user and group ID you want to log in with.

I would put that in the "barely supported" category...
 

Sine

Cadet
Joined
Apr 15, 2022
Messages
5
2) Disable Host Path validation globally (not recommended)
3) Wait Until Cobia comes out later this year where they are working to make the service check (i.e. SMB, etc) portion of Host Path validation able to be disabled on a per app basis, which is much less severe of a measure to take.

Than that is the way it has to be, I'll just disable host path validation for now and worry about it again when Cobia comes around. All other solutions are hacky at best.
And most of my apps require access to a SMB share anyway. So disabling it globally or per app doesn't make that much of a difference in my case.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I switched my apps to NFS. It was relatively painless since you can just copy/paste the paths from the old hostpath location.

After that it all works, including the SMB accesss via windows.

One wrinkle I ran into in case it might help someone: the validation affects all paths used in the config. Not just added data or config folders. So, for example, if you use VPN and have written in a path to OpenVPN config files, the app will not work if those files are within an SMB share.
 

Blakestandal

Cadet
Joined
May 11, 2023
Messages
9
*Barely above noob*

So i have a read this entire thread and understand most of it.

disabled the "Enable Host Path Safety Checks" box and now my Plex app works.

But... even with the Host Path set to the correct data sets AND SMB disabled/enabled for the sake of tests, Plex itself sees no data in those folders.



Permissions is set up so everything and every group has all permissions because #I'mBasic.

Thoughts anyone? I have already asked the plex groups similar questions that lead me to this thread which answered some of my questions but GOOD LORD this is making me pull my hair out.

(regretting upgrading from Core to Scale...)
 

Attachments

  • Screenshot 2023-05-11 215544.png
    Screenshot 2023-05-11 215544.png
    18.3 KB · Views: 141

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Thoughts anyone? I have already asked the plex groups similar questions that lead me to this thread which answered some of my questions but GOOD LORD this is making me pull my hair out.

Something seems off about the screenshot. Why does it show "data" with empty in the list and then "data/Movies" in the text field?

Maybe it would help to see if something wrong elsewhere if you can post your configuration for permissions and the share.
 

mgoulet65

Explorer
Joined
Jun 15, 2021
Messages
95
*Barely above noob*

So i have a read this entire thread and understand most of it.

disabled the "Enable Host Path Safety Checks" box and now my Plex app works.

But... even with the Host Path set to the correct data sets AND SMB disabled/enabled for the sake of tests, Plex itself sees no data in those folders.



Permissions is set up so everything and every group has all permissions because #I'mBasic.

Thoughts anyone? I have already asked the plex groups similar questions that lead me to this thread which answered some of my questions but GOOD LORD this is making me pull my hair out.

(regretting upgrading from Core to Scale...)
Are you using Official or TrueCharts Plex? TC offers support on their Discord. When you ask these types of questions, giving more config information will help. What is the dataset structure / permissions you are trying to use with Plex? What are their permissions? How do you have them passed to the App in its config?
 

Blakestandal

Cadet
Joined
May 11, 2023
Messages
9
Something seems off about the screenshot. Why does it show "data" with empty in the list and then "data/Movies" in the text field?

Maybe it would help to see if something wrong elsewhere if you can post your configuration for permissions and the share.
100% a permissions issue. I actually went with TC's version and had help installing and it seemed to fix the problem.
 

Blakestandal

Cadet
Joined
May 11, 2023
Messages
9
Are you using Official or TrueCharts Plex? TC offers support on their Discord. When you ask these types of questions, giving more config information will help. What is the dataset structure / permissions you are trying to use with Plex? What are their permissions? How do you have them passed to the App in its config?
I appreciate you mentioning this because it saved my life. the guys over on discord got me squared up and boy oh boy was it a permissions nightmare! i seriously hate permissions...
 

georgelza

Patron
Joined
Feb 24, 2021
Messages
417
trying to see how to "bleed" some now and get this fixed for longer term.
I do have 2 requirements, ye need TrueCharts for other use cases, so disabling HPV is not really a option long term.
Need Plex working, be that the official or the TC version.
Need qbittorrent (TC) to work,
I need external access to the Plex data located and the qbittorrent location move data from b to a.

I see allot of "work arounds" all over this thread, but haven't seen how either/both/together iX and TC is stating how to accomplish this with both of them being happy how it was done.
Problem is, with the head buddd of iX and their app usage of SMB and then TC with their NFS. the iX systems don't allow for specifying NFS as storage location, and TC don't allow for HP/SMB.

G
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
I've had no problems with apps using nfs and my windows machine using smb on the same Datasets. I've been using it since Truecharts released their nfs guide after Hostpath validation was implemented.
 

dain

Cadet
Joined
Jun 29, 2023
Messages
5
I'm also wondering how big performance penalty is making Apps access (lots of small) files via SMB or NFS? Or is it irrelevant because there's already a layer of abstraction in the Kubernetes / Docker volume?
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I could be missing some new solution. But, from what I've read, you have to mount the share via CLI after changing the registry to reflect the user and group ID you want to log in with.

I would put that in the "barely supported" category...
I've been mounting NFS shares in Windows for 6 months now, no issues. I have a "startup app" which is a script with this line (for example) in it:

mount "\\192.168.3.13\mnt\tank\NoBackup\Windows-Shared" Z:

I did have to turn the NFS client feature on in Windows 10. I did not modify any registry entries.

That's it. Works great. Not the same as mounting SMB at startup, slightly more effort but not a lot.
 
Top