Ubutnu Root Directory filling up and /var/lib/plexmediaserver doesn't exist

Server Version#: 1.24.5.5173
Player Version#:4.70.0

I’m having a very similar issue to this:

and this Moving PMS 'Library'

Running Ubuntu 20.04 (so latest as of Dec 2021)

BUT my issue is /var/lib/plexmediaserver doesn’t exist. So I can only get so far in the (well written) instructions by Chuck Pa.

When I run: systemctl stop plexmediaserver
I get a “does not exist” error.
and running df -h /lib/plexmediaserver also shows nothing.

So have folder names changed since those instructions were written and if so which bits do I need to change to move all the meta data to somewhere else with more room?

Thanks a ton in advance!
-Josh

Josh,
type snap list in a terminal window and see if you accidentally got the SNAP version of Plex

That failing, rpm -qa | grep -i plex

systemctl status plexmediaserver

Will do as soon as I get home tonight. In my digging last night, however, there was some snap stuff, so I think you’re right. So am I hosed if its a snap based plex? Again I’ll verify as soon as I get home. Thank you for the quick response.

You can go digging for the SNAP installation and pull out the Plex data .

It’s not too difficult if you’re willing.

Once the snap UUID directory is located, you can move the sub structure and create a systemd override for use with the DPKG package

The last you’ll want to do is for snap to remove with --purge so it doesn’t make a snapshot and waste more space.

ok so snap list gives me a small list the last two items are:
plexmediaserver
and
snap-store

does this mean I have the snap version?

running the rpm command and then systemctl shows:
Unit plexmediaserver.service could not be found

but this server is indeed running plex and its been working great for almost a year now till I started running out of space.

The snap directories I found were: right at the root in the home directory and in that is plexmediaserver → 226, 228, common and current. All of which seem to be empty directories.

If I go ALL the way to root and go into /var there’s another snap directory but again it seems to be full of empty directories.

So now I’m really confused where everything is stored and if I indeed have snap configured or not. Can you suggest where to look for my plex data? And barring that is there a way to convert a theoretical snap install to a more standard/up-to-date install?

Thank you!

FOUND IT!!!
FYI for future peeps:
/var/snap/plexmediaserver/common/library/Application Support/Plex Media Server/Metadata
12gb right there.
So that said, can I go back to your instructions and move this directory to my spot that has plenty of space making the symlink and purge there and call it good or since its snap do I have to be more careful?

sorry to keep spamming here but I want to make absolutely sure I know what I’m doing before hosing my system. Theoretically I can move everything from :
var/snap/plexmediaserver/common/Library/Application Support/PLEX MEDIA SERVER to the new drive correct?

This should answer al lmy questions so I’ll be quiet now and again thank you for all the help!!!

@megladon88

Just got to the end of my email list (I have 130 emails today)…

I’ll write here with detailed instructions in a moment.

Josh,

For the sake of this example, I’m writing instructions based on putting Plex in a /home directory where there is usually more space. Please change this base path however appropriate for your needs.

  1. Make the base directory
sudo mkdir /home/plexdir
  1. Copy the entire structure out of /var/snap to this new location
sudo bash
cd /var/snap/plexmediaserver
tar cf - ./Library | (cd /home/plexdir ; tar xf - )
  1. When that finishes, you’ll have a full copy of the server in /home/plexdata

  2. Download Plex from Media Server Downloads | Plex Media Server for Windows, Mac, Linux, FreeBSD and More for Debian. You probably want the AMD64 version (64 bit)

  3. Now we install the native package and stop it after installation

cd ~/Downloads
sudo dpkg -i  plexmediaserver*.deb
sudo systemctl stop plexmediaserver
  1. Next we tell the native package that we’re going to use the metadata stored in /home/plexdir. I’m using ‘gedit’ (graphical editor here). You can use whatever you like.
sudo mkdir  /etc/systemd/system/plexmediaserver.service.d
sudo gedit /etc/systemd/system/plexmediaserver.service.d/override.conf
  1. In the override file, place
[Service]

# Relocate Application Support directory to /home/plexdir
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdir/Library/Application Support"
  1. Tell systemctl that we’ve updated the plex service
sudo systemctl daemon reload
  1. Before starting Plex, make sure the files are all owned by ‘plex:plex’ (which didn’t exist prior to installation
sudo chown -R plex:plex /home/plexdir
  1. Make certain the SNAP package is stopped

  2. Start plex

sudo systemctl start plexmediaserver
  1. Test drive it. If all is OK then enable for autostart
sudo systemctl enable plexmediaserver 
  1. Now you can remove the snap with --purge and reclaim that space.

Except for the fact that cd /var/snap/COMMON/plexmediaserver was the directory everything else went great! THANK YOU for your detailed instructions and holding my hand during all this. THANK YOU THANK YOU!!!

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