TrueNAS and Plex Media Server
A painless and uneventful TrueNAS migration from FreeBSD-based CORE to their newer Linux-based SCALE is the latest in a long series of successful operations with this line of software. I decided to build a machine for home storage about six years ago and chose TrueNAS (called FreeNAS at the time) and it has worked flawlessly as a storage appliance ever since. There has been no loss of data from software failures, and it has successfully recovered from multiple hard drive failures. Based on my experience, I can heartily recommend TrueNAS for reliable data storage.
In addition to simple and reliable data storage capabilities, FreeNAS/TrueNAS also has an application services side. I've had a bumpier relationship with those features. Among the data stored on my TrueNAS box is my personal music collection, and I've been using Plex as one of several ways I consume my media. Plex Media Server has thus been my guinea pig for TrueNAS application hosting and finding problems with each. I've tried using it as a FreeNAS Plugin (stale and infrequently updated), as a self-managed application inside a FreeBSD jail (less stale but still a significant delay), to a Docker container running inside an Ubuntu virtual machine (timely updates but bhyve hypervisor has problems with Ubuntu) and now that I've migrated to TrueNAS SCALE I have new options to try.
Plex Media Server is one of the options under TrueNAS SCALE's "Apps" menu representing a collection of Helm charts. I have some vague idea this mechanism is related to Kubernetes, but I haven't invested time into learning the details as I just wanted to use it as a point-and-click user. I tried to create an instance with "Enable Host Path for Plex Data Volume" option pointing to my existing media share. My attempt failed with the following error:
Error: [EINVAL]
chart_release_create.app
VolumeMounts.data.hostPathEnabled.hostPath: Invalid mount path.
Following service(s) use this path: SMB Share, NFS Share
A bit of web searching found this is expected behavior: in order to avoid any potential problems with conflicting operations, helm charts will verify that each app has exclusive control to all volumes before proceeding. This is a reasonable thing to do for most applications, but unnecessarily cautious for media data on a read-only network share. And furthermore, it is not compatible with my media consumption pattern which requires leaving SMB and NFS sharing running. Thus, I add "Plex Helm Chart" to the running list of TrueNAS application service I've tried and failed.
I will now try a different approach: create a virtual machine for running Plex.