Hardlinking Files for Graceful Rename, Plex doesn't show any duplicates as I expect

Server Version#: 1.19.1.2645
Player Version#: Web 4.22.3

I’m running a Plex server on a proxmox LXC container–essentially running it on Debian. I have my media on FreeNAS, and it is mounted on the Plex machine via NFS mounts.

I was reading that the best way to get plex to recognize renames and associate metadata correctly is to make a copy of the file and let both exist before deleting the original. This makes sense. The best way to do that, in my opinion, is via hardlinks, as it takes up no more space.

However, this isn’t working as I expect. Plex can see all the media files, and randomly chooses one or the other of the hardlink “names” to use. For example:
Star Trek DS9 S1E1: /mnt/media/Star_Trek_Deep_Space_9/Season_1/whatever_episode_name.mp4
Star Trek DS9 S1E2: /mnt/media/Star_Trek_Deep_Space_Nine/Season_01/whatever_different_name.mp4

It only shows one of the files, seemingly switching between them at random every time I initiate a scan. It doesn’t show that there are two files for every matching episode, one in the 9 folder path, one in the Nine folder path. I’ve renamed half of my TV shows this way, some have separate folders, some have the same folders with different Season folders (usually Season_1 vs Season_01), some are somewhere in between.

The only interesting thing I’ve found in the logs so far is
Apr 19, 2020 01:28:45.088 [0x7fc5067fc700] DEBUG - There were 2 top-level paths for Star Trek: Deep Space Nine.
This is not the case for other things that have had a full file path change, such as Buffy->Buffy_The_Vampire_Slayer. Plex is only showing the original Buffy path files.

Plex isn’t showing multiple files (blue icon) for any of these cases, but it clearly can see both files at scan time and switches between them. When I navigate the library by folder view, it only shows the currently “chosen” version in each respective set of file paths.

I’m not having any luck finding similar behavior documented anywhere, and I’m hesitant to just get rid of one copy and let plex fine the new one. I’d rather not go through all the metadata resolution, thumbnail generation, etc. again for every file.

Any ideas?

This is only necessary if you have custom artwork or other metadata, want to keep played / unplayed status, etc.

If you do not care about such things, then the best thing to do is Plex Dance the files. It is like starting over. It removes all traces of the movies/shows/etc from your system.

No idea how Plex reacts to hard links. However, is space really an issue? The duplicates do not have to exist for a long period of time. Once PMS scans the libraries and matches everything you can delete the original files.

This is what I’m trying to avoid. It’s half because I don’t want to lose some things, and half that I’ve already spent too much time trying to fix bad matches and so on. I don’t want to refetch everything.

Yes/no. I’ll have to turn off snapshots, because most even short-lived changes take up permanent space for 6 months. The system is also under very heavy load right now doing online backups, so it’s going to be slow.

Yes copies are an option, but I don’t really see why they have to be. Unless plex is tracking inodes (it’s not, or renames would resolve immediately without refetching metadata), there’s no reason it should be ignoring hardlinks randomly. They are, unless explicitly checking for hardlinks and matching inodes, exactly the same as copies. They just don’t take up space on the filesystem.

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