Update to 1.40 killed whole DB

Server Version#:1.40.0.7998-c29d4c0c8, upgrade from 1.38

Hi,
I got Ubuntu server 22 LTS running PMS with ovverride config which moves Application Support folder to a SSD drive specifically dedicated for this purpose.
Yesterday i ran apt-get update and upgrade routine to update PMS to latest version and it finished successfully. But PMS failed to start - couldnt find library folder. I did restart and PMS started, but totally blank. I checked dedictaed SSD and it shows only newly installed PMS App support folder, however space occupied on disk missmatches with size of PMS folder: i see ~12 Gb used space as it usually were, but PMS folder is now around 0.2 Gb.
Got no clue what to do next, please advice.

Not sure what logs to provide as my installation is blank now.

Please provide:

  1. Override.conf
  2. du -hs of the new location
  3. du -hs of /var/lib/plexmediaserver
  4. ls -la of the new location’s “Databases” directory
  5. ls -la of the /var/lib/plexmediaserver’s Databases directory

Note: Updating PMS will not overwrite the customization unless you had modified /lib/systemd/system/plexmediaserver.service

I suspect you have a typing error in the override.conf file (they are easy to make)

Same problem :frowning:

In which case you’re absolutely invited to also share the information requested by chuck to help troubleshooting this.

/media/plex/ - mounted ssd for plex lib. nothing else is there

  1. Override.conf
#
# Customize Plex's config
#
# Identify this as a service override
[Service]
#
#  Move the data directory
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/media/plex/Library/Application Support"

#
#  These values are only needed if you wish to change user & group
User=htpc
Group=htpc
#
# This is needed to change the default umask
#UMask=0002    # this must be octal    - See warning below
  1. du -hs of the new location
htpc@zhtpc:/media/plex/Library/Application Support/Plex Media Server$ du -hs /media/plex/Library/Application\ Support/Plex\ Media\ Server/
5.8G    /media/plex/Library/Application Support/Plex Media Server/
  1. du -hs of /var/lib/plexmediaserver
htpc@zhtpc:~$ du -hs /var/lib/plexmediaserver/
16K     /var/lib/plexmediaserver/
  1. ls -la of the new location’s “Databases” directory
htpc@zhtpc:/media/plex/Library/Application Support/Plex Media Server$ ls -la
total 84
drwxrwxrwx 14 htpc htpc  4096 Feb 18 15:01  .
drwxrwxrwx  3 htpc htpc  4096 Sep 29  2021  ..
drwxrwxrwx 10 htpc htpc  4096 Feb 18 15:01  Cache
drwxrwxrwx  5 htpc htpc  4096 Feb 18 14:10  Codecs
drwxrwxrwx 23 htpc htpc  4096 Feb 18 14:59 'Crash Reports'
drwxr-xr-x  2 htpc htpc  4096 Oct 21  2021  Diagnostics
drwxr-xr-x  3 htpc htpc  4096 Oct  3 22:57  Drivers
-rw-------  1 htpc htpc    42 Feb 18 14:59  .LocalAdminToken
drwxrwxrwx  3 htpc htpc  4096 Feb 18 14:59  Logs
drwxr-xr-x  3 htpc htpc  4096 Sep 29  2021  Media
drwxr-xr-x  6 htpc htpc  4096 Jan 28  2022  Metadata
-rw-r--r--  1 htpc htpc     3 Feb 18 14:59  plexmediaserver.pid
drwxrwxrwx  2 htpc htpc  4096 Sep 29  2021  Plug-ins
drwxrwxrwx  7 htpc htpc  4096 Sep 29  2021 'Plug-in Support'
-rw-------  1 htpc htpc  1591 Feb 18 15:01  Preferences.xml
drwxr-xr-x  3 htpc htpc  4096 Mar 19  2023  Scanners
-rw-------  1 htpc htpc 12330 Feb 18 14:59 'Setup Plex.html'
drwxr-xr-x  2 htpc htpc  4096 Dec 26  2022  Updates
  1. ls -la of the /var/lib/plexmediaserver’s Databases directory
htpc@zhtpc:/media/plex/Library/Application Support/Plex Media Server$ ls -la /var/lib/plexmediaserver/
total 12
drwxr-xr-x  3 plex plex 4096 Sep 29  2021 .
drwxr-xr-x 45 root root 4096 Feb 18 10:20 ..
drwxr-xr-x  3 plex plex 4096 Sep 29  2021 Library

When I asked for “Databases”, I was referring to this: (the actual directory)

Please obtain the correct info and repost.

[chuck@lizum plex.2010]$ ls -la
total 8
drwxr-xr-x  8 chuck chuck  136 Oct 16 12:25 ./
drwxr-xr-x  9 chuck chuck  103 Dec  6 01:45 ../
drwxr-xr-x  4 chuck chuck   65 Oct 16 12:27 Drivers/
drwxr-xr-x  3 chuck chuck 4096 Nov  7  2022 ds418/
drwxr-xr-x 15 chuck chuck  316 Feb  9 21:23 Plex Media Server/
drwxr-xr-x  2 chuck chuck    6 Oct 18  2022 Plug-ins/
drwxr-xr-x  7 chuck chuck   96 Oct 18  2022 Plug-in Support/
-rw-------  1 chuck chuck  734 Oct 16 11:42 Preferences.xml
drwxr-xr-x  2 chuck chuck    6 Oct 18  2022 Updates/
[chuck@lizum plex.2011]$ cd Plex\ Media\ Server/
[chuck@lizum Plex Media Server.2012]$ cd Plug-in\ Support/
[chuck@lizum Plug-in Support.2013]$ cd Databases/
[chuck@lizum Databases.2014]$ ll
total 19182808
drwxr-xr-x 3 chuck chuck       4096 Feb  9 21:23 ./
drwxr-xr-x 7 chuck chuck         96 Nov  7  2022 ../
-rw-r--r-- 1 chuck chuck      83711 Sep 19 23:02 blobs.sql
-rw-r--r-- 1 chuck chuck    1064960 Feb  9 10:17 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 chuck chuck    1060864 Oct 17 02:01 com.plexapp.plugins.library.blobs.db-2023-10-17
-rw-r--r-- 1 chuck chuck    1064960 Feb  2 02:02 com.plexapp.plugins.library.blobs.db-2024-02-02
-rw-r--r-- 1 chuck chuck    1064960 Feb  5 02:02 com.plexapp.plugins.library.blobs.db-2024-02-05
-rw-r--r-- 1 chuck chuck    1064960 Feb  8 02:02 com.plexapp.plugins.library.blobs.db-2024-02-08
-rw-r--r-- 1 chuck chuck      32768 Feb  9 21:23 com.plexapp.plugins.library.blobs.db-shm
-rw-r--r-- 1 chuck chuck          0 Feb  9 21:23 com.plexapp.plugins.library.blobs.db-wal
-rw-r--r-- 1 chuck chuck 2015440896 Feb 10 01:45 com.plexapp.plugins.library.db
-rw-r--r-- 1 chuck chuck 1747972096 Oct 17 02:01 com.plexapp.plugins.library.db-2023-10-17
-rw-r--r-- 1 chuck chuck 1951059968 Feb  2 02:02 com.plexapp.plugins.library.db-2024-02-02
-rw-r--r-- 1 chuck chuck 1991020544 Feb  5 02:02 com.plexapp.plugins.library.db-2024-02-05
-rw-r--r-- 1 chuck chuck 2033364992 Feb  8 02:02 com.plexapp.plugins.library.db-2024-02-08
-rw-r--r-- 1 chuck chuck      32768 Feb 10 02:05 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 chuck chuck    4128272 Feb 10 02:05 com.plexapp.plugins.library.db-wal
-rw-r--r-- 1 chuck chuck 6235299840 Mar  2  2023 PMSdatabases.tar
[chuck@lizum Databases.2015]$ 

I ran a quick test with a VERY large DB.

It took quite a bit longer for “503” maintenance mode to finish the upgrade than I expected (I have 280,000 items in the DB)

I will also share/assert. on small CPUs. not waiting long enough can be fatal.

If this is the case. are there PMS backups of /var/lib/plexmediaserver prior to copying to SSD ?

Im not sure what helped, cause i updated ubuntu version, rechecked all drives and rights, did lots of restarts, and somehow my DB reappered. It may be the case ChuckPa mentioned…

I had the same problem (see previous post).
I restarted the server (the whole box - “reboot now”), and now everything is back to normal.
Not the most elegant (or logical/safe) fix, but it’s worked for me.

I’m happy to share diagnostics / logs if you think that will help - but now that it’s working not sure how much that be of use? Just ask :slight_smile: