Music Library Disappears on Library Scan

Server Version#: Version 4.30.2
Player Version#: N/A Accessing via Chrome Browser
OS: Debian 10 / Buster

I have been using plex for a while but with COVID I’ve had more time to get it up to speed. Today I added a a 15 or so albums worth of content via a network drive that is shared via Samba… The drive is hot plugged into the Pi. Plex is a member of the share group which has read/write access.

After adding the new folders I ran scan library to pull them in, as I have done many times before. I went to get lunch, came back, and my library has complete disappeared EXCEPT for the new content. Everything else is gone.

Steps I have takiing:

  1. Rebooted system
  2. Rescan library metadata
  3. Confirmed Plex rights on samba share
  4. Remove and re-add library (same result)
  5. Restored dB from backup.

Restoring the dB did bring me back to a working library but did not include new content. So ran scan library again and boom, everything is gone except the new content.

Anyone know what I am doing wrong here or how to fix? Thanks!

DEBUG logs ZIP please which capture this happening?

I need to see what it’s doing

You want all the log files for just s specific file?

All please (ZIP / tar.gz ) of the ./Logs directory.

I don’t know if the logs have rolled at this point or not.

I booted the server again and re-ran the library scan to be sure that the logs would capture the activity and it seems to be pulling in the shared content and rebuilding from scratch. It is over 700 albums which is a bit annoying but I’m going to let it run out to see if it pulls the whole catalogue. I’ll post up the logs tomorrow once it finishes. I have no explanation for the behavior. I have made no changes to shares or permissions since it last failed. The only thing I did was restore the backup. Anway… let’s see where it takes us.

Well I am not sure what the issue was but my library is back up and functional. There was definitely and issue initially as I got the gray screen telling me to consult the community forums. After restoring the dB from backup it presented the same issue until I rebooted at which point it rebuilt the library from the ground up.

SEE EDIT BELOW… Thanks for stopping by.

So I thought this was solved but there are still issues.

My original content is back. That is good news However, the library did not pull in the new content added previously just before this issue appeared. There are ~20 albums missing. I tried rescanning the library which has always worked for me in the past but it just isn’t seeing the new content on the disc.

It has been at least 12 hours since the re-scan finished. Thoughts?

My remain issue was a permissions problem. Fix was to put the plex user in the same group as the share owner. Everything is indexing correctly. I never did track the original issue but the fix was a) restore from backup db.; and b) fix permissions. Ticket closed.

Sorry for not seeing this sooner

This is an alterntative.

This is still an issue. New content is still not appearing.

I’m pretty well versed in permissions and user rights so this was the first place I looked. I am pretty confident this isn’t the issue. I have a group called ‘music’ with full rights inherited. Plex is a member of the group. ‘stat /some file’ verifies settings. I did run through all the permissions again to confirm that they are properly set and propagating as new content is added.

Are you suggesting that I need to make plex run as a different user as the solution? Isn’t it enough to have the rights properly set?

I am pretty confident that the permissions are set properly and plex should have needed read/write access. But assumptions often prove fallible so I’m going to try making plex run as the group owner. I’ll update this thread in a bit.

Well, turns out that my grasp on permissions wasn’t as solid as I thought. Running Plex as the share owner and group fixed the issue. Thank you for pointing me in the right direction. Now I can marked this solved!

I highly recommend that some update the instructions for running plex as another user and that it include alternate instructions for Windows, OSX, and Linux generally and probably RPi in particular. They are dated. At the very least, update the environment variable in override.conf.

For others researching this issue, here were my steps for RPi4:

  1. mkdir /etc/systemd/system/plexmediaserver.service.d

  2. nano /etc/systemd/system/plexmediaserver.service.d/override.conf

  3. Add the following to this file, update YOUR-USER-HERE and YOUR-GROUP-GROUP to reflect your system, then save and exit:

# Customize Plex's config
#
# Identify this as a service override
[Service]
#
#  Move the data directory
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
#
#  These values are only needed if you wish to change user & group
User=YOUR-USER-HERE
Group=YOUR-GROUP-HERE
#
# This is needed to change the default umask
Umask=002 
#
# this must be octal 
# Warning: Some distros used UMask while others use Umask
# Some distros want 4 octal digits, not the standard 3. RPi uses 3 (as in 002)
  1. chown -R YOUR-USER-HERE:YOUR-GROUP-HERE /etc/systemd/system/plexmediaserver.service.d/ (NOTE Not sure if this is necessary)

  2. chown -R YOUR-USER-HERE:YOUR-GROUP-HERE /var/lib/plexmediaserver

  3. systemctl --system daemon-reload

  4. service plexmediaserver start

  5. Confirm success by pulling up Plex in your browser. (you.sever.ip.address::32400/web/

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