ubuntu with windows nfs share - Behaviour of trashed items

So i am wondering a little about the the trash function of plex.

For some reason, one of my libraries will have a lot of trash icons, which might be a short fallout of the nfs share, however these trash icons appear even if a scan wasnt run, but you can only get rid of these trash icons by running a scan.

Im wondering why it works like this, it means that the trash icons will prevent me from playing media until i manually run a scan, or wait until new media is added - Why is pms marking items as unavailable WITHOUT a scan? PMS does not correct these trashed items on its own even if the nfs share is available, unless a scan is run

@trumpy81 said:
The trash icons appear when Plex is unable to read a drive/folder/file and you have the Empty trash automatically after every scan setting disabled. This also prevents Plex from deleting your library entries, metadata etc.

This will happen when your NFS share or connection is unavailable and can only be corrected when the connection is again available and you run a scan.

If you enable Empty trash automatically after every scan you will find files will disappear (be deleted) from your library and you will have to re-add them to your library whenever the NFS connection is active again.

Check your network card settings in Linux and Windows and make sure they are not being powered off by the computer. That should help maintain the NFS connection.

Also, make sure the NFS connection is up and running before you start Plex, that way Plex will not see the connection as unavailable when it checks the file availability.

Allowing Plex to automatically start at boot time can often lead to the NFS connection not being available, as it has not initialised in time, so always start Plex manually.

I understand why it happens, but i dont understand the logic in plex.

Plex will mark the items as unavailable WITHOUT a scan - But it will NOT mark them available again, BEFORE a scan is run.

If plex required a scan to mark them as unavailable, then i would never have a trash icon, because this “NFS outage” literally lasts maybe a few seconds, or if plex corrected itself without a scan.

The problem here, is that plex somehow checks if files are available under the hood even without running a scan in the library, but plex does not check “under the hood” if the files are available again, only after a scan. This is odd behaviour

@trumpy81 said:
When you open Plex, it has to display the files, either in the hubs or in your libraries, which means it has to read the disk to find them, if they are not found what would you have Plex do?

There is nothing wrong with the way Plex is marking your files as unavailable, it’s because they are unavailable and you could not play them in any case, unless you expect Plex to use magic or something … lol

And since Plex must wait for disk activity to trigger a scan, that means that you must initiate the scan yourself, because there is no disk activity otherwise.

Disk activity = file changes (new files, name changes, that type of thing)

So if i open an app, plex checks disk for these files, it notices they are not available and marks as trash.

Now if i close the app, and open it again, it surely must check if these files exist again(which they do) yet it does not remove the trash icons unless i run a scan.

Im not sure if im not making myself clear here, here is a “process”

1, i open plex app
2, i see all media without trash icons
3, i close plex app
4, i unmount nfs drive
5, i open plex app
6, items are marked with trash icon.
7, i close plex app
8, i re-mount nfs drive
9, i open plex app
10, items still marked as trash
11, i run a scan
12, no longer marked as trash.

The setting “Scan automatic on changes” is NOT checked - So my question is, why is plex checking media availability without user action, and behaving on in, why does it not correct itself again unless the user behaves on it?

But why does unmounting the drive disconncet it from plex, when remounting it does not reconnect it?

Why do these 2 actions behave differently?. Why is there a file change on umount, but not remount?

Plex is able to read when the drive is disconnected, WITHOUT running or triggering a library scan. So clearly plex is notified of this disconnect somehow

Why is plex not notified about a reconnect of the drive, this is my question.