Moving Database

Server Version#: Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-194-generic x86_64)
Player Version#: Version 1.20.4.3517
I have Plex Media Server running in a headless HP server (command line only) with an SSD boot drive and two 4TB data drives containing the media. There is quite a lot of data on the drives, 1325 movies, 3000 TV Show episodes and 1600 music albums.
My SSD is now full with metadata (in excess of 85GB) so am looking to move this to one of the two 4TB disks. I found an old process from 2015 that apparently worked for Ubuntu 14.04, but this does not work for V16.04, not sure if it is a permission thing or if it is because the process has changed.
Please can someone publish a clear guide on how to do this as I cannot be the only person to need it.
Thanks

If I’m understanding your desire correctly, the answer should be in here:

Specifically: Moving Plex’s metadata (Library) directory on systemd based systems

So I tried to move the metadata using the following and Plex no longer starts

Mounted the two disks in /disks instead of /media
Filesystem 1K-blocks Used Available Use% Mounted on
udev 3969112 0 3969112 0% /dev
tmpfs 804580 9164 795416 2% /run
/dev/mapper/Happy–vg-root 102282576 97028404 35460 100% /
tmpfs 4022888 20 4022868 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4022888 0 4022888 0% /sys/fs/cgroup
/dev/sdc1 3845577736 2621069080 1029141440 72% /disks/media1
/dev/sdd1 961301832 670714560 241732848 74% /media/user
/dev/sde1 480589520 438741320 17412540 97% /media/backup
/dev/sda1 240972 108581 119950 48% /boot
/dev/sdb1 3845577736 3105352468 544858052 86% /disks/media2
cgmfs 100 0 100 0% /run/cgmanager/fs
tmpfs 804580 0 804580 0% /run/user/1000

Moved the metadata to /disks/media1/plexMD and set owner to plex
drwxrwx— 9 neil sambashare 4096 Oct 25 16:49 .
drwxr-xr-x 4 neil sambashare 4096 Nov 16 18:27 …
drwxrwx— 3 neil sambashare 4096 Aug 19 2019 Backups
drwxrwx— 2 neil sambashare 16384 Apr 23 2017 lost+found
drwxrws— 10 neil sambashare 4096 Nov 11 09:14 Music
drwxrwx— 3 plex plex 4096 Oct 25 16:49 plexMD
drwxrwx— 2 neil sambashare 4096 Apr 23 2017 Recorded TV
drwxrwx— 5 neil sambashare 4096 May 17 2020 TV Shows
drwxrwx— 3 neil sambashare 4096 Jun 8 19:28 Videos

Created the override file in /etc/systemd/system/plexmediaserver.service.d, owner root:root and also plex:plex, tried chmod to 777 too

Customize Plex’s config

Identify this as a service override

[Service]

Move the data directory

Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/disks/media1/plexMD/plexmediaserver/Library/Application Support”

These values are only needed if you wish to change user & group

#User=chuck
#Group=chuck

This is needed to change the default umask

#UMask=002 # this must be octal - See warning below

there is no point me putting the metadata in /home as that is full. the only thing I didn’t try is to run plex with my user and group, but that shouldn’t be necessary

First and foremost:

Since user plex:plex is running as the PMS user,
Did you make certain user plex:plex minimally has R-X for /disks, /disks/media1, and /disks/media1/plexMD ?

Then, after that step,

Is user plex:plex owner of the new plexmediaserver directory and all below it?
(there is a step in my procedure where you force-set the ownership again to make certain tar/cp didn’t break it).

In all sincerity, a step was missed somewhere. The procedure works when followed step by step

I will help you review if you wish.

Thank you, the problem seemed to be that plex didn’t have permissions to /disks

I checked by creating test.txt and then running
sudo -u plex test -r /disks/media1/plexMD/test.txt
The with -w for write and -x for execute

Glad you found it!

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