Possible detached PMS data after updating to DSM 7

Server Version#: 1.24.1.4931

I’m on a Synology running DSM 7 (Updated from DSM 6). I may have messed up the installation of PMS on DMS 7 leaving my Plex Media Server shared folder not well defined. Things ran well for a while and then PMS started consuming all memory and dying. Found my Plex database growing wildly, try to repair it but ended up having to remove the Plex database entirely and having PMS rebuild and reindex the entire DB. That took a long time but Plex has been running fine for a while now.

Issue 1: PMS shared folder not well defined

My PMS shared folder appears to be under /volume1/@apphome/PlexMediaServer/Plex Media Server. This directory has the following (from the /volume1 directory):

Wizard Jupiter:du -sh \@apphome/PlexMediaServer/Plex\ Media\ Server/*
28G	@apphome/PlexMediaServer/Plex Media Server/Cache
20M	@apphome/PlexMediaServer/Plex Media Server/Codecs
0	@apphome/PlexMediaServer/Plex Media Server/Crash Reports
0	@apphome/PlexMediaServer/Plex Media Server/Diagnostics
81M	@apphome/PlexMediaServer/Plex Media Server/Logs
376G	@apphome/PlexMediaServer/Plex Media Server/Media
17G	@apphome/PlexMediaServer/Plex Media Server/Metadata
16G	@apphome/PlexMediaServer/Plex Media Server/Plug-in Support
1.5M	@apphome/PlexMediaServer/Plex Media Server/Plug-ins
4.0K	@apphome/PlexMediaServer/Plex Media Server/Preferences.xml
Wizard Jupiter:

However in Control Panel > Shared Folder there is a shared folder named “Plex”. There is no indication of the path to that shared folder but it does say that the size of the shared folder is 1.9 gig which matches the size of the path /volume1/Plex. And all shared folders correspond to directories under /volume1. I performed a test creating a new shared folder named test and a /volume1/test folder was created. I then deleted the shared folder and /volume1/test was removed. I feel pretty confident that I can delete the Plex shared folder as there is nothing under /volume1/Plex except a Cache directory. But the question remains - where is the PlexMediaServer? Shouldn’t there be a PlexMediaServer share be listed in Control Panel > Shared Folder?

Issue 2: PMS is not updating Play History

When looking at the PMS Dashboard Play History is not updating at all. Set to Full History, All Media, All Users for the Last 30 Days shows next to no history. New movies and TV series that I’ve watched are not getting updated. I also use Tautulli and things are updating there but not in the PMS Dashboard.

Issue 3: Updating to 1.24.2.4973

So far I’m on PMS version 1.24.1.4931. All of this has been done with that version. That version was downloaded from Plex.tv. I just got a notification in the Plex Web interface of a new server version - 1.24.2.4973! @ChuckPa says that that is the version where this new PMS Shared folder is required. If that’s true then what was I running before? Maybe upgrading to 1.24.2.4973 will tie all this together and fix things but I want to ensure that issues 1 and 2 are addressed before applying that update.

Also, as I said, in the past I had to download the server software directly from Plex.tv. This new server software is now coming the regular way through a notification in the Plex Web app. Is this just because the DMS 7 version of PMS has moved to the regular method?

@adefaria

Want some help Unscrewing this?

I know what happened.

Sure!

give me a bit. Up to my XXXXX in alligators

You familiar with the (tar | tar) technique ?

I’m familiar with tar(1). By (tar | tar) do you mean some sort of piping of one tar to another?

exactly what I mean,.

Thinking / plan is -

  1. You have a partial PMS in PlexMediaServer

  2. This is either DSM not having cleaned up after making a copy (I am still trying to figure out why it’s doing that)

  3. We take what’s there – provided it’s not older – and overlay it with what exists

  4. The result being – we fill in all the missing pieces.

Sounds intriguing. What are the steps I need to take to do this?

First, let’s figure out which is which?

  1. du -ms of each location (/volume1/PlexMediaServer and /volume1/@apphome/PlexMediaServer)

  2. dig into each of those trees and into the Plug-in Support/Databases directory.

  3. Which com.plexapp.plugins.library.db is bigger ?

Note: I do not have a /volume1/PlexMediaServer. I have /volume1/Plex. Additionally I only have /volume1/Plex/Library/Application Support/Cache. There is no Plug-in Support/Databases under this tree.

Wizard Jupiter:du -ms /volume1/Plex
1905	/volume1/Plex
Wizard Jupiter:here

As for /volume1/@apphome/PlexMediaServer I have:

Wizard Jupiter:du -ms /volume1/\@apphome/PlexMediaServer/
444984	/volume1/@apphome/PlexMediaServer/
Wizard Jupiter:ls -l /volume1/\@apphome/PlexMediaServer/Plex\ Media\ Server/Plug-in\ Support/Databases/*.db
-rw-rw-r-- 1 PlexMediaServer PlexMediaServer 2449215488 Sep  9 00:26 '/volume1/@apphome/PlexMediaServer/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.blobs.db'
-rw-rw-r-- 1 PlexMediaServer PlexMediaServer  428231680 Sep  9 09:38 '/volume1/@apphome/PlexMediaServer/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db'
Wizard Jupiter:

Good. that makes it cleaner.
Sorry for thinking you had something different.

what you have here is the norm for any DSM 7 version below 1.24.2.4973.

Junk files in the Plex share can be deleted. For some reason , the initial migration didn’t copy them over but they are now moot and OBE.

PMS 1.24.2.4973 will (hopefully) move, but worst case COPY, the files to PlexMediaServer.

Let’s give the normal PMS 1.24.2.4973 update (manual install on top of what exists) a shot.

We can adjust / correct DSM as needed after.

(there have been bugs discovered with DSM 7 Package Center)

I downloaded PMS 1.24.2.4973 through the standard means - Plex web page shows there’s a server update, download it, go into DMS, stop Plex server and manually install. I come up to this screen:

Are these settings correct? Should I change anything?

nope. let it ride through.

By default, I don’t change anything,.

This page gives you control (if you want) where the logs should be written – if not inside the PlexMediaServer shared folder.

Updating and it’s taking a while… Longer than previous updates. Hmmm…

Jupiter:sj PlexMed
PlexMed+  2958  2093  0 11:34 ?        00:00:00 /bin/sh /var/packages/PlexMediaServer/scripts/postinst
PlexMed+  2961  2958  0 11:34 ?        00:00:00 /bin/sh /var/packages/PlexMediaServer/scripts/dsm7-file-moving
PlexMed+  2966  2961 57 11:34 ?        00:01:32 mv /volume1/@apphome/PlexMediaServer/Plex Media Server /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData
Jupiter:

Looks like it’s moving stuff. But from where to wear I don’t know.

And I have a new shared folder now:

Don’t touch. LOL

There is something bizarre in DSM 7.

A linux mv should be a move on the same file system. It’s copying+post-delete.

Yeah, I’ve noticed that too sometimes. Usually on the same file system it’s just wham and it moves. But sometimes it seems to copy+post-delete as you say. Maybe it’s btrfs?

But it looks like we’re doing well. After this finishes and things look good I will delete the Plex shared folder (and leave the PlexMediaServer shared folder).

I checked that. If the inode = 256 or 2, then it’s a sub-volume and copy-on-write is mandated but it’s not. the inodes a big values.

Who knows what they are doing in busy-box.

Looks like it’s just moving like 320G. The operative command executing (pid 2966):

Wizard Jupiter:cmdline 2966
mv /volume1/@apphome/PlexMediaServer/Plex Media Server /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData 
Wizard Jupiter:

Does this mean that /volume1/@apphome/PlexMediaServer will no longer be used?

  1. ‘mv’ will copy & delete if it needs to. You can see me telling it to move.

  2. The empty @apphome/PlexMediaServer is required by Synology. Every linux username needs a home directory.

That makes sense and is exactly what happened. I’m up on PMS now. Thanks for all your help and hopefully this exchange may have helped you too.

Meantime, any idea about the missing Play History in the Dashboard? Or should I post some other thread about that.