Not recording to NFS mounted share

Server Version#: 1.41.6.9685
Tuner Make/Model: SiliconDust HomeRun Prime
Guide/Lineup name: Verizon Fios Freehold NY Plus
Using XMLTV?: No

Too many band-aids, too many tests. I’ve fallen and I can’t get up!

I moved my Plex Server to a dedicated machine (Ubuntu 24.04.2 LTS), and left all of my libraries on my previous server (also Ubuntu 24.04.2 LTS). Sharing all of my folders via NFS rather than swapping hard drives into the new machine. (Maybe/probably a mistake?)

I can’t get any DVR recordings to work, but live TV does, so I know (I think) the tuner is not the issue. I’m pretty confident that its a permissions issue, but I can’t nail it down.

My NFS mounted folder on the PMS is “drwxr-xr-x 4 root root 4096 Feb 2 00:48 nfs”
The folder the recordings are set to is “drwxrwxrwx 11 nobody nogroup 4096 Apr 1 13:27 buntuTV”

The permissions should be OK but I always get confused re: the ownership and groups. Can someone point me in the right direction? It’s obviously something in the way that this instance of NFS is mounted and set up because I can record to a shared NFS folder on my NAS with no issue.

Machine 1: PMS
Machine 2: Media storage (NFS)
NAS: other random storage (NFS)

Thanks in advance!

@ckronengold

I can show you how to do this.

Your Linux skills mastery level will determine how much I have to write

On a 1-10 scale, where are you at ?

I’m very good at following directions :wink:

I’m comfortable. Been running Plex on an Ubuntu server since 16.04. I’m currently running 2 Ubuntu servers – one for Plex on bare metal, the other for my homelab containers. I’ve got my NAS mounted to both of them via fstab and can access them no problem. When I was running PMS on the same box where the media drives were mounted directly to the filesystem, I didn’t have any issues.

But I’d hardly call any of that “mastery.” I’d want to give myself a 5, because that’s better than most people I know, but since I got myself into this mess and can’t get out, its probably a 3.

whose NAS are you using?

Synology.

But to be clear, ideally I’d like to be writing / recording to the drives on the Ubuntu server NOT running Plex.

So this essentially a Ubuntu PMS → Ubuntu Storage configuration where DVR records to the Ubuntu Storage mounts but other PMS media is read from the Syno?

If so, do you have a specific exported top-level-directory for where to store the DVR content and, if so, what is the /etc/exports record for it

– bingo

/etc/exports from the Ubuntu Storage machine:

/mnt/TVeight    192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/mnt/dockssd    192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/mnt/MReight    192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)`

Those are the names of the hard drives in the machine. “TVeight” is an 8TB drive that I use for – wait for it – TV shows. DockSSD is the drive with my docker containers. “MReight” is another 8TB drive that sits in the Middle of the stack of hard drives on the Right.

So TVeight is the drive I use for the Plex DVR.

drwxrwxrwx   3 corey  2000       4096 Feb 27  2024  PlexDVR
drwxrwxrwx   7 corey  2000       4096 Jan 19 01:00  PlexKidsDVR

What I have:

  1. Exports - switch to ‘async’ nfs (this is the RW export, media is RO)
    /vol/plex *(rw,async,no_subtree_check,no_root_squash)

  2. Setup nfs mount on Plex server machine,

# plex
192.168.0.20:/vol/plex    /glock/plexinc       nfs defaults,sec=sys,rw,auto,async,rsize=4194304,wsize=4194304,x-systemd.after=network-online.target,nofail,bg 0 0
  1. Setup setgid for directories on PMS machine AND NFS storage
    – Don’t forget to set perms on base directory before mounting the NFS as well as after the NFS is mounted.

How this works.

  1. sec=sys allows the two machines to trust each other for UID/GID security
    (bypassing the need for user accounts). Leaves on UID / GID mechanism.

  2. async allows the Plex machine to delegate file write management to the storage machine ( a ‘send and forget’ as Plex machine is concerned )

  3. Setgid ensures permissions are set correctly -AND- propagated correctly into subdirectories and files as new content is recorded.
    – All sub directories and files inherit the permissions and ownership from the parent directory. Once you set it up, it’s self maintaining.

  4. Making a group (e.g “plexdvr”) of which you and plex are members makes this easily identifiable. You can keep ownership, group plexdvr has RW.

Give a read. Try with a few things by hand,

1 Like

Worked like a charm! Thanks @ChuckPa!!!

Everything now being written ok with correct permissions ?

Sure seems to be!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.