If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Unclaimed server on your network after symlinking Media to new path (on different device)

russ-flixruss-flix Posts: 4Members

Hi, I'm quite advanced with Linux and believe this to be a bug.

I stopped plexmediaserver.
Copied the Media folder to /home/username/Media
Moved the Media folder to Media_OLD
Symlinked to the new Media location, The application should not be able to tell the difference unless specifically testing for a symlink and not file access.
lrwxrwxrwx 1 root root 20 Aug 4 13:38 Media -> /home/redacted/Media

Demonstrating every file is owned by plex

plex:x:119:122::/var/lib/plexmediaserver:/bin/bash

root@redacted:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media# find . ! -uid 119
root@redacted:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media#

All files kept their permissions/octals (owned by plex) I experience no other errors.

Except now every single day, Plex tells me the server is unclaimed. I claim it, Same thing again the next day. For some reason it seems to be happening each day which could not be a local OS issue. It used to tell me an unclaimed server existed but I deleted them a few times and now stopped doing it.

Everything works. Except this.

Tagged:

Best Answer

  • russ-flixruss-flix Posts: 4Members
    Accepted Answer

    Also I should add it stopped happening , After a Plex update. So it was a Bug.

    Show a bit more respect for Debian before blaming it over a Windows port. Clearly the issue is not Debian.

    This is obviously resolved now. It was a Plex bug as we can see from this ridiculous windows file tree on a Linux volume, where I'm using a symlink. No butt biting.

    lrwxrwxrwx 1 root root 20 Aug 4 13:38 Media -> /home/graphene/Media drwxr-xr-x 4 plex plex 4096 Jul 12 19:18 Metadata -rw-r--r-- 1 plex plex 5 Aug 10 17:46 plexmediaserver.pid drwxr-xr-x 3 plex plex 4096 Jul 27 08:36 Plug-ins drwxr-xr-x 7 plex plex 4096 Jul 12 18:46 Plug-in Support -rw------- 1 plex plex 1053 Aug 10 17:46 Preferences.xml root@graphene:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server#

Answers

  • ChuckPAChuckPA Posts: 16,850Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Not a bug. The symlink is biting you in the butt and is a local OS issue.

    Create the proper systemd override and it will never happen.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • russ-flixruss-flix Posts: 4Members

    @ChuckPA said:
    Not a bug. The symlink is biting you in the butt and is a local OS issue.

    Can you clarify this other then just saying its so? I'm a senior developer and engineer and "is a local OS issue" doesn't explain anything. AFAIK if your code cant do something every other app can its a bug. The onus is on you to explain why its not if your saying so.

    Also , Could you clarify what you mean by "symlink biting me in the butt" if I write something in Python or Ruby that checks for file access or existence its not at all interested if its a symlink.

    Perhaps once you explain the "biting you in the butt OS local issue" I can lodge an issue with the Debian bug tracker.

    Create the proper systemd override and it will never happen.

    I shouldn't need to do this if your code is written properly. I want my file tree to work regardless of the systemd service configuration. As it should.

  • russ-flixruss-flix Posts: 4Members
    Accepted Answer

    Also I should add it stopped happening , After a Plex update. So it was a Bug.

    Show a bit more respect for Debian before blaming it over a Windows port. Clearly the issue is not Debian.

    This is obviously resolved now. It was a Plex bug as we can see from this ridiculous windows file tree on a Linux volume, where I'm using a symlink. No butt biting.

    lrwxrwxrwx 1 root root 20 Aug 4 13:38 Media -> /home/graphene/Media drwxr-xr-x 4 plex plex 4096 Jul 12 19:18 Metadata -rw-r--r-- 1 plex plex 5 Aug 10 17:46 plexmediaserver.pid drwxr-xr-x 3 plex plex 4096 Jul 27 08:36 Plug-ins drwxr-xr-x 7 plex plex 4096 Jul 12 18:46 Plug-in Support -rw------- 1 plex plex 1053 Aug 10 17:46 Preferences.xml root@graphene:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server#

  • ChuckPAChuckPA Posts: 16,850Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Sure, I'll be happy to clarify. Before throwing around your senior developer status, know this: I've been developing in Unix and Linux for 30+ years now in the kernel, system services, and applications on the full range of target platforms from HA server farms to embedded devices on microkernels.

    1. Symlinks are unidirectional. If you symlink to a new directory, spawn a process, and the process performs a chdir() to .., it will not follow the symlink backward to the origin. It will seek the parent directory at the target.
    2. Symlink across a file system boundary and use of iNotify. same condition applies.
    3. PMS uses the environment variable PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR. This is the chosen method to communicate where the metadata resides.
    4. Systemd affords a very clean and well documented mechanism for customizing any PMS runtime variables.
    5. Systemd is the mechanism chosen by the distros to spawn services. Do not blame PMS.

    If you want to do something different, completely transparent to everything, including SystemD and avoid the use of symlinks

    use a bind mount and avoid systemd entirely. Now you have it in /etc/fstab and at a lower level in the kernel, beneath ALL the BS.

    Again, not a bug; a choice.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • ChuckPAChuckPA Posts: 16,850Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    As one final note. Debian isn't supported by Plex. One of the ninja's and the community support it.

    It happens to work for Debian 8.x and above because of SystemD. Were it not for that, it wouldn't run at all.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
This discussion has been closed.