Plexserver doesn't start [dietpi 6.32.2]


not sure if this happened in context with the latest update to 6.3.2 or a prior power outage, but my Plex doesn’t start any more.
journalctl logs the failing reason:

Starting Plex Media Server...
[b]DietPi Plex Media Server[679]: [b]/bin/mkdir: cannot create directory ‘/var/lib/plexmediaserver/Library’: File exists[/b][/b]
DietPi systemd[1]: plexmediaserver.service: Control process exited, code=exited status=1
DietPi systemd[1]: Failed to start Plex Media Server.

Peeking there, we find a symlink:

lrwxrwxrwx  1 plex dietpi   20 Mar 23  2019 Library -> /mnt/plexlib/Library

Looking into the destination:

ls /mnt/plexlib/Library
ls: cannot access '/mnt/plexlib/Library': No such file or directory

systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/plexmediaserver.service.d
           └─dietpi-group.conf, dietpi-services_edit.conf
   Active: failed (Result: exit-code) since Sun 2020-09-06 11:40:16 CEST; 2min 49s ago
  Process: 1680 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPOR
T_DIR}" (code=exited, status=1/FAILURE)

/var/lib/plexmediaserver has been originally owned by root:root, I experimented with plex:plex, plex:dietpi, root:dietpi etc., no success.

Is there anybody experiencing the same or has an idea to fix it?
Will a simple dietpi uninstall/reinstall fix this at a last resort? (Fearing the loss of all the metadata)

Thanks for help


many thanks for your message. I did a test installation on my RPi3B+ and it looks different for me because I don’t have that sym link

Library -> /mnt/plexlib/Library

For me it’s a normal folder

root@DietPi3:/var/lib/plexmediaserver# ls -la
total 12
drwxr-xr-x  3 plex plex 4096 Sep  7 10:46 .
drwxr-xr-x 14 root root 4096 Sep  7 10:46 ..
drwxr-xr-x  3 plex plex 4096 Sep  7 10:46 Library

As well /mnt did not contain a plexlib folder

root@DietPi3:/mnt# ls -la
total 24
drwxr-xr-x  7 root   root   4096 Aug 26 12:04 .
drwxr-xr-x 21 root   root   4096 Jun  8 12:05 ..
drwxrwxr-x  6 dietpi dietpi 4096 Aug 26 12:01 dietpi_userdata
drwxrwxr-x  2 dietpi dietpi 4096 Jun  8 12:05 ftp_client
drwxrwxr-x  2 dietpi dietpi 4096 Jun  8 12:05 nfs_client
drwxrwxr-x  2 dietpi dietpi 4096 Jun  8 12:05 samba
drwxr-xr-x  2 root   root      0 Feb 14  2019 usb

Do you know if /mnt/plexlib was/is provided by an external disk?

Thank you for taking a look at this and hinting me to broken hardware.

Plexlib had been moved and symlinked to an external disk, as it grew too large for the SD-Card.
This disk died (in fact a 16GB USB-Stick just for this purpose).

If you ever lose an external plexlibrary :
Create a new mounting point on a fresh disk.
Create a folder called “Library” on it.
Make this folder owned by plex (chown -R plex:plex )
Create a symlink to “Library” inside /var/lib/plexmediaserver
Set the correct user:group for the original library folder:
chown -R plex:plex /var/lib/plexmediaserver
Restart Plex.

Just did it and Plex ran up successfully.
Now it’s like a fresh install, building a new library.

Thank you for the push to the right direction, Joulinar!

thx for sharing your experience. Good to see that creating a new library is straight forward :slight_smile: