I was having problems with plex starting after editing /etc/default/plexmediaserver file and pointing the metadata line to a new location. I created a folder within my /home partition called plexMD and copied the folder located at /var/lib/plexmediaserver to it. Now I am not sure if I am Dyslexic, but even following some how-to's ended up in frustration. So down below is a cut and paste from a tutorial I found..just edited it some and it worked! The original link to the it is at: http://www.geeklee.co.uk/migrate-plex-media-server-metadata-ubuntu/
I appreciate the information presented by the author of the link and wanted to give credit where it's due...that being said doing what is listed below worked for me and hopefully will work for you, if you are having problems.BTW You can create the directory elsewhere or name it whatever you want JUST make sure to follow the general structure...especially within the /etc/default/plexmediaserver config file...slashes in certain areas and no quotes make ALL the difference...trust me.
This worked on a freshly installed and updated system running: ubuntu 14.04 LTS 64-bit and Plex Media Server for Ubuntu 64-bit ver. 0.9.12.4.1192-9a47d21
Create New Directory
Go into terminal and type:
$ sudo mkdir -p /home/yourusernamehere/plexMD/plexmediaserver
Migration
Stop the plexmediaserver service:
$ sudo service plexmediaserver stop
Rename /var/lib/plexmediaserver to /var/lib/plexmediaserver_old
$ sudo mv /var/lib/plexmediaserver /var/lib/plexmediaserver_old
Copy (recursively) /var/lib/plexmediaserver_old to your new location (or other disk area)
$ sudo cp -R /var/lib/plexmediaserver_old/* /home/yourusernamehere/plexMD/plexmediaserver
[OPTIONAL] You can double check everything has been copied by checking the contents and size of the directory:
$ ls -al /home/yourusernamehere/plexMD/plexmediaserver
There should be a Library folder in the above directory)
$ du -sh /var/lib/plexmediaserver_old && du -sh /home/yourusernamehere/plexMD/plexmediaserver/
This will report the size of the original and new directory.
Change ownership of new area (recursively) for the user plex:plex
$ sudo chown -R plex:plex /home/yourusernamehere/plexMD
Edit /etc/defaults/plexmediaserver, look for line beginning PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.
$ sudo gedit /etc/default/plexmediaserver
Update the line to your new area BUT keeping the trailing “Library/Application\ Support” e.g.
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/yourusernamehere/plexMD/plexmediaserver/Library/Application\ Support
Start the plexmediaserver service:
$ sudo service plexmediaserver start
Confirm you get a start/running and a Process ID. You can also check the service is running:
$ sudo service plexmediaserver status
Browse the Plex Web Client and confirm everything is OK and as you left it (it should be)
Back Out
If the worst happens, back out is straight forward:
Stop the plexmediaserver service:
$ sudo service plexmediaserver stop
Rename /var/lib/plexmediaserver_old to /var/lib/plexmediaserver
$ sudo mv /var/lib/plexmediaserver_old /var/lib/plexmediaserver
Edit /etc/defaults/plexmediaserver, look for line beginning PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.
$ sudo gedit /etc/default/plexmediaserver
Comment out this line with a # e.g.
# PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/yourusernamehere/plexMD/plexmediaserver/Library/Application\ Support
Start the plexmediaserver service:
$ sudo service plexmediaserver start
Confirm you get a start/running and a Process ID. You can also check the service is running:
$ sudo service plexmediaserver status
Browse the Plex Web Client and confirm everything is back to normal.
Edit /etc/defaults/plexmediaserver, look for line beginning PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.
$ sudo gedit /etc/default/plexmediaserver
Update the line to your new area BUT keeping the trailing “Library/Application\ Support” e.g.
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/yourusernamehere/plexMD/plexmediaserver/Library/Application\ Support
then end part should not have “Library/Application\ Support” it should just be “Library/Application Support”
the \ seems to break it!
even if this only helps one person ill be glad i commented back!
I’m not sure if this is still an active thread but I am having an issue with this. I have a separate OS volume and Data Volume. I have my Data volume setup in a raid 5 and being my OS drive is much smaller I wanted to move my Plex Metadata directory to my newly created raid 5 volume. I followed these instructions to a T but afterwards I can not get plex to start. I get the following error:
Job for plexmediaserver.service failed because the control process exited with error code. See “systemctl status plexmediaserver.service” and “journalctl -xe” for details.
User@PlexMedia:/$ sudo 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 Wed 2018-01-31 16:33:15 CST; 3s ago
Process: 25530 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver “/usr/lib/plexmediaserver/Plex Media Server” (code=killed, signal=TERM)
Process: 26196 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: 25530 (code=killed, signal=TERM)
Jan 31 16:33:10 PlexMedia systemd[1]: Failed to start Plex Media Server for Linux.
Jan 31 16:33:10 PlexMedia systemd[1]: plexmediaserver.service: Unit entered failed state.
Jan 31 16:33:10 PlexMedia systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Jan 31 16:33:15 PlexMedia systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Jan 31 16:33:15 PlexMedia systemd[1]: Stopped Plex Media Server for Linux.
Jan 31 16:33:15 PlexMedia systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Jan 31 16:33:15 PlexMedia systemd[1]: Failed to start Plex Media Server for Linux.
If I revert back to the old directory under /var/lib everything works fine.
This is on Ubuntu Server 16.04 and Plex ver 1.10.1
The way Ubuntu 16.04 works changed, so the config file in /etc/default/plexmediaserver doesn’t do anything. You need to edit /etc/systemd/system/plexmediaserver.service.