Ubuntu install to symlink failing

Server Version#: 1.30.0.6486-629d58034

I am trying to avoid installing on the OS logical volume. I setup a symlink, (i have tried relaitve and non relative)

ll /var/lib |grep plex
lrwxrwxrwx 1 plex plex 31 Dec 28 16:41 plexmediaserver → …/…/apps/plex/plexmediaserver/

When i try to install i get the following:

PlexMediaServer install: PlexMediaServer-1.30.0.6486-629d58034 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: New
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: render
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: Intel(R) Core™ i5-4690K CPU @ 3.50GHz
PlexMediaServer install: Intel i915 Hardware: Not found
PlexMediaServer install: Nvidia GPU card: Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
useradd: user ‘plex’ already exists
PlexMediaServer install: ERROR: Cannot create user “plex”. Error: 0
PlexMediaServer install: Plex Media Server: ver PlexMediaServer-1.30.0.6486-629d58034 - Installation failed. Final configuration not performed.
PlexMediaServer install: Assistance is available in our Support Forums.
PlexMediaServer install: both
dpkg: error processing package plexmediaserver (–configure):
installed plexmediaserver package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
plexmediaserver
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be much apricated.

The better/easier way: Customizing your Plex configuration on systemd based systems

I created the override with the variable mentioned :
Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdir/Library/Application Support”

When i try to install i again, i see this in the service failure output:

A start job for unit plexmediaserver.service has begun execution.
░░
░░ The job identifier is 10665.
Dec 28 17:53:12 nab-media01 Plex Media Server[36267]: /bin/mkdir: cannot create directory ‘/apps’: Permission denied
Dec 28 17:53:12 nab-media01 systemd[1]: plexmediaserver.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ An ExecStartPre= process belonging to unit plexmediaserver.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Dec 28 17:53:12 nab-media01 systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ The unit plexmediaserver.service has entered the ‘failed’ state with result ‘exit-code’.
Dec 28 17:53:12 nab-media01 systemd[1]: Failed to start Plex Media Server.
░░ Subject: A start job for unit plexmediaserver.service has failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu

Override file

Move the data directory

Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/apps/plex/plexmediaserver/Library/Application Support”

I see it still creates /var/lib/plexmediaserver – Are there other variables i need to add to have the application live on another LV?

Remove the override.conf file.
Install Plex normally

apt install plexmediaserver

This will create the plex user and systemd entries. Stop plex

systemctl stop plexmediaserver.service

Now where did you mount the non OS drive and what is the fstab entry?

its mounted to /apps/plex/plexmediaserver

Then your variable should be:

Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/apps/plex/plexmediaserver"

This cannot be a network drive.

How did you create this mount (all the steps). Or you can read the other Linux Tips.

It was created as logical volume from the volume group from the local disks.

19 lvcreate -L 50G -n plex-lv ubuntu-vg
20 pvs
21 lvs
22 mkfs -t ext4 /dev/ubuntu-vg/plex-lv
23 mkdir /apps/plex
24 vi /etc/fstab
25 mount -a

So the process should look like this:

Install as normal
Stop Plex
Create override file with enviornment
Move /var/lib/plexmediaserver/* to /apps/plex/plexmediaserver/
Start Plex

If you did the default install then:

umount /apps/plex
chown -R plex: /apps
mount /apps/plex

Yes.

I got that to work, Thanks!

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