I’ve just transitioned from Windows Server to TrueNAS Scale (Ubunutu) for my Plex Server.
I used to store my media on mirrored drives and the optimized versions of said media on a stripped drive array (they can easily be recreated in case of hardward failure). I used a symbolic link in Windows to link the ‘Plex Versions’ directory to another physical path and it worked GREAT.
On Linux, I can’t get it to work. I’ve verified that the symbolic link points to the right path, but it seems that when I try optimizing new media, it can’t write to the location (same permissions on both pools) because it’s probably trying to create a directory with the same name as the link.
So, here’'s the directory and the full 777 permissions:
root@station[/mnt/default/media/videos/movies/english]# ls -l Plex\ Versions
lrwxrwxrwx 1 root root 30 May 9 19:11 'Plex Versions' -> /mnt/temp/video/movies/english
root@station[/mnt/default/media/videos/movies/english]# ls -lLR Plex\ Versions
'Plex Versions':
total 25
drwxrwxrwx 3 root root 4 May 9 19:31 'Optimized for TV'
'Plex Versions/Optimized for TV':
total 1
-rw-r--r-- 1 root root 0 May 9 19:31 test
root@station[/mnt/default/media/videos/movies/english]#
I created the test file to make sure I could indeed write (at least as root).
Logs:
May 09, 2022 19:32:42.755 [0x7f2f09218b38] Debug — Versions: version file path is "/data/videos/movies/english/Plex Versions/Optimized for TV/10 Cloverfield Lane (2016).mp4"
May 09, 2022 19:32:42.756 [0x7f2f09218b38] Error — Error creating directory "/data/videos/movies/english/Plex Versions/Optimized for TV": File exists
May 09, 2022 19:32:42.756 [0x7f2f09218b38] Error — TranscodeJobManager: [Running] directory is not writable: "/data/videos/movies/english/Plex Versions/Optimized for TV"
Yeah, mount option is good. I think this is less of a Plex problem and more of a container problem.
I got further though, if I created a symbolic link with the container relative paths it stopped complaining that it couldn’t write to the directory. Now it just fail on some random stream not found.
There is a way to start optimization from the “Library”, right side, “…”->Optimize, that’s where the bug is for not being able to select the storage location… only occurs here.
This ability existed already before it stopped working.
That is what I use the Library level Optimize job for. Any new additions are automatically converted, it does not require any intervention nor the selection or exclusion of any content.
Set it up once and forget it.
At the time being I still have previously defined optimization jobs that are Library level and still working… but after Plex upgrades I cannot create new Libraries with a similar setup, and that is how I discovered the feature is broken. Then I tried a hardware upgrade and duplicate the setup when I hit this issue again and confirmed the problem was not limited to an older/upgraded instance.
I serve all contents from a NAS at home, and I like to keep an optimized mobile version that auto synchronizes to a smaller NAS in a mobile/travel setup ( think travel trailer/RV ). I do this to avoid needing to serve the contents from a central location and always requiring internet access… same content no matter if home or not. It all works nicely without needing any manual interventions.
Without that feature of Library level optimization working, my magic setup is broken.