Plex Media Scanner command line

Server Version#: 1.16.5.1554
Player Version#: NA

I am trying to force a partial scan on a directory, but when I run this it seems to actually start scanning the entire thing. Which takes significantly longer when I just need to manually fix something. I run this command:

sudo su - plex -c “/usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan --force --directory /Volumes/Media 3/TV Shows/Spongebob Squarepants/”

From my understanding it should just update that directory?

Partial scans are driven by the iNotify mechanism of the Linux kernel for all filesytems which are natively mounted to the host (not network shares).

--force does force a full scan.

Is /Volumes a local filesystem or remote filesystem?

If local, the easiest way to check that you’re not exceeding the kernel table defaults is to:

  1. Verify DEBUG logging on, VERBOSE is off
  2. Restart PMS
  3. Wait 2 minutes (it sets up everything)
  4. Download the ZIP of the logs
  5. Attach them.

I can look to see what’s happening and that there’s no notify errors.

You need to specific which library too. You may have the same directory in multiple libraries and the scanner needs to run on each library so that info is required. It’s not possible to “scan this folder regardless what library it’s in”.

1 Like

The reason I ask is because I moved some media around, and one of my TV Shows has the red trashcan as if its missing files. Diving into the season(s) that also have the trashcan showed everything was there, no trash cans on the individual file. So I wanted to try and force a scan on this directory again. But the --force probably answers why it doesn’t do that on just that directory.

Just to double check though, here are the logs:
Plex Media Server Logs_2019-08-29_20-24-51.zip (3.1 MB)

For context:

Did you restart PMS as I had requested? I don’t see it in the logs you attached. All I see is playback spanning about an hour of elapsed time.

I did, yes. I can do it again if you need but I did stop the service, started and then waited 2m.

I see the log file size changes but nowhere do I see the actual startup. This is odd.
I normally see the network and Plex.tv initialization info. I’m not finding it in the logs.

I do see the server immediately getting bogged down with the database activty. This is concerning and I hope we can resolve that quickly.

Do you have “Update my Library automatically” set in Settings - Server - Library - Show Advanced ?

Yes, I do.

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