Unable to start plex after moving library

I am running Linux Mint 18 and I have followed the instructions here:

https://forums.plex.tv/discussion/222214/how-to-move-plexs-data-on-linux#latest

When I try to start plex, I get the following message:

Job for plexmediaserver.service failed because the control process exited with error code. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details.

journalctl -xe shows the following:

Jun 24 10:34:27 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 10:34:27 Misato sh[21840]: /bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library’: Permission denied
Jun 24 10:34:27 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 10:34:27 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 10:34:27 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 10:34:27 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 10:34:27 Misato sudo[21837]: pam_unix(sudo:session): session closed for user root
Jun 24 10:34:32 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 10:34:32 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 10:34:32 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 10:34:32 Misato sh[21847]: /bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library’: Permission denied
Jun 24 10:34:32 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 10:34:32 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 10:34:32 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 10:34:32 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.

systemctl status plexmediaserver.service:

● plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Sat 2017-06-24 10:34:42 CDT; 5min ago
  Process: 21252 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server" (code=killed, signal=TERM)
  Process: 21857 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=1/FAILURE)
 Main PID: 21252 (code=killed, signal=TERM)

Jun 24 10:34:37 Misato systemd[1]: Failed to start Plex Media Server for Linux.
Jun 24 10:34:37 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 10:34:37 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 10:34:42 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 10:34:42 Misato systemd[1]: Stopped Plex Media Server for Linux.
Jun 24 10:34:42 Misato systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Jun 24 10:34:42 Misato systemd[1]: Failed to start Plex Media Server for Linux.

Seems to me that plex trying to create ‘/var/lib/plexmediaserver/Library’ when it already exists.

I must change that and will do so as soon as done here . Since it was written, We’ve implemented full SystemD support.

Here is the FAQ which supersedes https://forums.plex.tv/discussion/265114/linux-faq

As you do this, you will no longer need /usr/lib/plexmediaserver but just leave it there.

In the link above, you’ll see how to create the SystemD override. It is now the standard (since about August of last year)

I followed the instructions in the new FAQ, and still plex will not start.

systemd does not seem to be reading the custom config file.

Jun 24 21:22:57 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 21:22:57 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 21:23:02 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 21:23:02 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 21:23:02 Misato systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Jun 24 21:23:02 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 21:23:20 Misato sudo[6281]: bcoppernoll : TTY=pts/0 ; PWD=/Library/Plex Library/plexmediaserver ; USER=root ; COMMAND=/bin/systemctl reset-failed
Jun 24 21:23:20 Misato sudo[6281]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 24 21:23:20 Misato sudo[6281]: pam_unix(sudo:session): session closed for user root
Jun 24 21:23:23 Misato sudo[6283]: bcoppernoll : TTY=pts/0 ; PWD=/Library/Plex Library/plexmediaserver ; USER=root ; COMMAND=/bin/systemctl start plexmediaserver
Jun 24 21:23:23 Misato sudo[6283]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 24 21:23:23 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 21:23:23 Misato sh[6286]: /bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library’: Permission denied
Jun 24 21:23:23 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 21:23:23 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 21:23:23 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 21:23:23 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 21:23:23 Misato sudo[6283]: pam_unix(sudo:session): session closed for user root
Jun 24 21:23:28 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 21:23:28 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 21:23:28 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 21:23:28 Misato sh[6293]: /bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library’: Permission denied
Jun 24 21:23:28 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 21:23:28 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 21:23:28 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 21:23:28 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.

The correct name and structure is:

/etc/systemd/system/plexmediaserver.service.d/
   override.conf

In override.conf, you must minimally have to move the Plex Library directory`

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/new/path/to/Application Support"

After saving:

sudo systemctl daemon-reload
sudo systemctl restart plexmediaserver

Please show me your `override,conf and the directory names you are using / where things are.

@ChuckPA said:
The correct name and structure is:

/etc/systemd/system/plexmediaserver.service.d/
   override.conf

This directory did not exist, I had to create it along with teh override.conf

In override.conf, you must minimally have to move the Plex Library directory`

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/new/path/to/Application Support"

After saving:

sudo systemctl daemon-reload
sudo systemctl restart plexmediaserver

Please show me your `override,conf and the directory names you are using / where things are

Here is my override.conf:

#
# Customize Plex's config
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/Library/Plex Library/plexmediaserver/Library/Application Support"
#
#
User=plex
Group=plex
#
#Umask=0002    # this must be 4 digits of octal

Umask line is comment out because I get the following error in the system log:

[/etc/systemd/system/plexmediaserver.service.d/override.conf:10] Unknown lvalue 'Umask' in section 'Service'

There was a typo in my initial override.conf file, current overide.conf posted above. Output of journalctl -xe is with the above posted override.conf is:

Jun 24 21:58:48 Misato sudo[7547]: pam_unix(sudo:session): session closed for user root
Jun 24 21:58:53 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 21:58:53 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 21:58:53 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 21:58:53 Misato sh[7558]: /bin/mkdir: cannot create directory ‘/Library’: Permission denied
Jun 24 21:58:53 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 21:58:53 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 21:58:53 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 21:58:53 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 21:58:59 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 21:58:59 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 21:58:59 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 21:58:59 Misato sh[7565]: /bin/mkdir: cannot create directory ‘/Library’: Permission denied
Jun 24 21:58:59 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 21:58:59 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 21:58:59 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 21:58:59 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 21:59:04 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 21:59:04 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 21:59:04 Misato systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Jun 24 21:59:04 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.


First, the easy part and probably why the override is being ignored.

UMask=nnnn

not Umask=

@ChuckPA said:
First, the easy part and probably why the override is being ignored.

UMask=nnnn

not Umask=

That is a typo from the FAQ, copy and pasted the code from that


That still has not fixed the issue:

Jun 24 22:14:51 Misato sudo[8085]: bcoppernoll : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/systemctl reset-failed
Jun 24 22:14:51 Misato sudo[8085]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 24 22:14:51 Misato sudo[8085]: pam_unix(sudo:session): session closed for user root
Jun 24 22:14:53 Misato sudo[8087]: bcoppernoll : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/systemctl start plexmediaserver
Jun 24 22:14:53 Misato sudo[8087]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 24 22:14:54 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 22:14:54 Misato sh[8090]: /bin/mkdir: cannot create directory ‘/Library’: Permission denied
Jun 24 22:14:54 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 22:14:54 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 22:14:54 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 22:14:54 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jun 24 22:14:54 Misato sudo[8087]: pam_unix(sudo:session): session closed for user root
Jun 24 22:14:59 Misato systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jun 24 22:14:59 Misato systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has finished shutting down.
Jun 24 22:14:59 Misato systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has begun starting up.
Jun 24 22:14:59 Misato sh[8097]: /bin/mkdir: cannot create directory ‘/Library’: Permission denied
Jun 24 22:14:59 Misato systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
Jun 24 22:14:59 Misato systemd[1]: Failed to start Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit plexmediaserver.service has failed.
-- 
-- The result is failed.
Jun 24 22:14:59 Misato systemd[1]: plexmediaserver.service: Unit entered failed state.
Jun 24 22:14:59 Misato systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.


As for the path /Library/Plex Library/plexmediaserver/Library/Application Support

Since this is now outside Plex’s default home directory, which was created when user plex was created, remember it’s up to you to create the directory and make certain user plex:plex has ownership of of /Library/Plex Library. User plex:plex must minimally have execute permission to navigate through /Library. It does not need rx, just x

I will presume you’ve already moved the contents of /var/lib/plexmediaserver/Library to /Library/Plex Library and verified ownership there is plex:plex also (chown -R plex:plex ....)

@ChuckPA said:
As for the path /Library/Plex Library/plexmediaserver/Library/Application Support

Since this is now outside Plex’s default home directory, which was created when user plex was created, remember it’s up to you to create the directory and make certain user plex:plex has ownership of of /Library/Plex Library. User plex:plex must minimally have execute permission to navigate through /Library. It does not need rx, just x

I will presume you’ve already moved the contents of /var/lib/plexmediaserver/Library to /Library/Plex Library and verified ownership there is plex:plex also (chown -R plex:plex ....)

Ok, we seem to be running in circles here. I have already stated I have followed the directions in the FAQ that was provided as the current one. Those directions have not worked. This is an existing library from what was a working install using a symlink. Due to a HDD failure the directory had to be migrated to a new raid array. The permissions have been set as exactly as before and exactly as stated in the FAQ.

I agree, we’re out of sync.

Then what am I missing?

Step back and hit me again?

You can’t get it to point to your new location via the override. Correct?

we’ve identified the variance of capitalization for Mint (UMask versus Umask). I’ve already updated the FAQ thanks to your input.

This isn’t rocket science. you should have been done long ago

As followup for you to consider, I have customized my Plex installation in my Mint 18 VM, accounting for UMask case correction.

A. /etc/systemd/system/plexmediaserver.service.d/override.conf contains as shown below (with the UMask correction)

B. PMS is fully operational and shown without errors by journalctl

C. Directory /var/lib/plexmediaserver still exists because Plex’s username has not yet been changed to use the new home directory in /etc/passwd

D. The “Invalid escape sequences” warning has been corrected and available when the next post-1.5.x version of PMS is released to Public or via any Plex Pass version.

Have I missed anything?

@ChuckPA said:

You can’t get it to point to your new location via the override. Correct?

No, the issue seems to be that plex thinks that there is no existing DB at the location it has been pointed to and appears to be trying to create a directory that already exists.

we’ve identified the variance of capitalization for Mint (UMask versus Umask). I’ve already updated the FAQ thanks to your input.

Thank you.

This isn’t rocket science. you should have been done long ago.

Exactly, should have take at most a few mouse clicks in the WebGUI to point it to a new location. I don’t think that it is too uncommon of a thing for people to have/want to move the default location of the DB to a custom location. Seems to be enough of a need for it for there to be an FAQ answer.

Here is how I fixed the problem, no idea why it worked:

sudo su
rm -r /var/lib/plexmediaserver
mkdir /var/lib/plexmediaserver
chown plex:plex /var/lib/plexmediaserver
systemctl edit plexmediaserver

#Copy and paste this

#
# Customize Plex's config
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver"
#
#
User=plex
Group=plex
#
UMask=0002    # this must be 4 digits of octal

sudo systemctl daemon-reload
sudo systemctl start plexmediaserver

#Run through the initial setup, add no libraies, leave everything at default


#start the move
systemctl stop plexmediaserver
cd /var/lib/plexmediaserver
tar cf - ./Plex\ Media\ Server | (cd /Library/plexmediaserver ; tar xf -)
cd /Library/plexmediaserv
chown -R plex:plex .


systemctl edit plexmediaserver

#Copy and paste this:

#
# Customize Plex's config
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/Library/plexmediaserver"
#
#
User=plex
Group=plex
#
UMask=0002    # this must be 4 digits of octal

systemctl daemon-reload
systemctl start plexmediaserver


#Check if server is running and remove defauld DB location
systemctl stop plexmediaserver
m -r  /var/lib/plexmediaserver/

#Backup old copy
mv -r  /var/lib/plexmediaserver/Librarymv Plex\ Media\ Server Plex\ Media\ Server.bak

#move old DB to new location
cp -r "/Library/Plex Library/plexmediaserver/Library/Application Support/Plex Media Server" Plex\ Media\ Server
chown -R plex:plex .

#start plex with restored DB
systemctl start plexmediaserver

1 Like

That’s NUTS!

You did the same thing again and this time it worked. WTF Doc?

We were in sync the whole time, saying the same thing from two perspectives.

The ONLY thing i can think of at this point
 plex:plex didn’t own a directory / have permission to it along the way in the transfer. For reasons beyond me, it was trying to go elsewhere. Did Mint take a drag on something it shouldn’t have? haha

Sorry to revive this, but this is my first post here as I am having a similar issue and been working on my raspbian plex server for literally a week. I am intermediate in linux systems and had the usual issue of my sd card filling up on my pi3 , so I followed Chuck D’s guide after 5 days of trying to create a symlink and I successfully got plex to recognise my new library location on my HDD. the only issue is that on boot, I am getting the same error as above.

Job for plexmediaserver.service failed because the control process exited with error code. See "systemctl status plexmediaserver.service" and "journalctl -xe" for details.

Now, if I systemctl daemon-reload, I get a dialog box saying: authentication required to reload systemd state. Once I enter my password, and restart plex media server, It works fine. I just do not want to have to do this every time on boot.

It’s obviously an authentication issue with users but I am not sure what to change. The guide I followed resulted in the configs and attempts below:

  1. I have my default user in plexmediaserver.prev set to pi, from the original plex. Changing this back to plex did nothing.

  2. Here is my Override.conf as per Tut:


#
# Customize Plex's config
[Unit]
Description=Plex Media Server for Linux
After=network.target

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/plexlibrary/plex-data/plexmediaserver/Library/Application Support"
#
#  These values are only needed if you wish to change user & group
User=pi
Group=pi
#
# This is needed to change the default umask
UMask=0002    # this must be 4 digits of octal

Note that the user and group is Pi to match the plex user in plexmediaserver.prev and the permissions on my LIbrary in /mnt/plexlibrary/plex-data/ is set at user pi, group pi.

Again, the server starts after reload the systemctl and restart the server, just not on boot. I hope I can get this working and scan the library as it keeps freezing my PI on scan.

thanks!

A few things to check

  1. unmount the volume
  2. chown pi:pi - the mount point itself before mounting
  3. mount the volume.
  4. repeat the chown (**chown -R pi:pi **) to correct all files

Full procedure is here.

Hello, thank you for your response. the full procedure you linked to below your post is the tutorial I followed to get my plex to recognise my library on my external HDD so thank you for that as I spend countless hours trying to sort this.

I did what you suggested however it hasn’t quite worked. I have got to step 3 and mounted my volume again after sudo chown pi:pi /mnt/plexlibrary
The problem is I can’t see any files in the mounted drive now, it’s just empty. For step 4, do you mean do sudo chown -R /mnt/plexlibrary at the root level or the full path sudo chown -R /mnt/plexlibrary/plex-data/plexmediaserver/

I am a little worried now as my drive contents are not showing up.

OK edit to add, I just rebooted, the drive is back but when i launched chrome, plex actually popped up as connected on boot but as a whole new installation so now its showing a new server connected and my old one is just saying its unavailable. Now I am getting very frustrated as m pi3 plex server has worked for months until the sd card filled and I tried to change the metadata location. My kids are so disappointed as they can’t watch their stuff. I am going to end up trashing this pi and moving to an old windows machine if I can’t fix this soon. A week is enough in my book, and I am seriously behind on my work.

Linux is VERY strict on permissions.

and you apparently didn’t look at the two find statements and the entire process in the How-To I attached ?

Please re-read carefully. Skipping steps is not advised.

Also, now with Plex running as user pi:pi , you will need make certain user pi can see the media as well as yourself.

i’m sorry I don’t quite get what you mean by two find statements? I did follow the how to exactly apart from changing the file location. Everything was working fine, apart from not starting the server on boot. I managed to get it all working again now though, but still doesn’t automatically load without sudo systemctl daemon-reload, followed by sudo service plexmediaserver restart. After that it all works fine. I am currently using a small script in /etc/rc.local which says sleep 10 sudo systemctl daemon-reload & sleep 5 sudo service plexmediaserver restart
this did start the server on boot but I still had to reload the daemon and restart anyways so I am tinkering with it to see if it works. :grinning:

My library is now all done, apart from the fact that the server works for 10 mins, then the attached drive goes absolutely nuts spooling like crazy and the whole system won’t work. and no longer loads the dashboard when Nothing is active in plex, and like I said before this worked 100% fine until i moved the metadata folder after my sd card filled. one more thing is the error in here?? sudo journalctl -xe | grep -i plex

Feb 16 10:17:03 raspberrypi systemd[1]: [/etc/systemd/system/plexmediaserver.service.d/override.conf:15] Failed to parse mode value, ignoring: 0002    # this must be 4 digits of octal
Feb 16 10:17:13 raspberrypi systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Unit plexmediaserver.service has begun starting up.
Feb 16 10:17:13 raspberrypi systemd[1]: Started Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Unit plexmediaserver.service has finished starting up.
Feb 16 10:17:20 raspberrypi systemd[1]: mnt-plexlibrary.mount: Directory /mnt/plexlibrary to mount over is not empty, mounting anyway.
-- The directory /mnt/plexlibrary is specified as the mount point (second field in
Feb 16 10:17:20 raspberrypi systemd[1]: Mounting /mnt/plexlibrary...
-- Subject: Unit mnt-plexlibrary.mount has begun start-up
-- Unit mnt-plexlibrary.mount has begun starting up.
Feb 16 10:17:37 raspberrypi systemd[1]: Mounted /mnt/plexlibrary.
-- Subject: Unit mnt-plexlibrary.mount has finished start-up
-- Unit mnt-plexlibrary.mount has finished starting up.
Feb 16 10:19:30 raspberrypi sudo[1360]:       pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver.service
ER=root ; COMMAND=/bin/systemctl status plexmediaserver.service

I dont wanna give up but my god this is getting silly now, I may just go back to windows and run this off my old PC as a media server.