Sonarr rename is copying files

Hey,

I'm having a weird issue with Sonarr 3.0.3.750 (might not be directly related to rclone and mergerfs but I'm stuck) where on a rename of an episode which is already in GDrive, it downloads the whole file and renames it.

Is that caused because I'm using MergerFS and can't directly rename is on the drive? I've checked the permissions and they appear to be correct with Sonarr not showing any errors in the trace log:

20-4-3 10:49:15.4|Debug|RenameEpisodeFileService|Renaming episode file: [63744] Season 1/Ozark.S01E07.Nest.Box.WEBRip.1080p.DD5.1.H265-d3g.mkv
20-4-3 10:49:15.4|Trace|FileNameBuilder|Media info is unavailable for [63744] Season 1/Ozark.S01E07.Nest.Box.WEBRip.1080p.DD5.1.H265-d3g.mkv
20-4-3 10:49:15.4|Trace|PreferredWordService|Calculating preferred word score for 'Ozark.S01E07.Nest.Box.WEBRip.1080p.DD5.1.H265-d3g.mkv'
20-4-3 10:49:15.4|Debug|EpisodeFileMovingService|Renaming episode file: [63744] Season 1/Ozark.S01E07.Nest.Box.WEBRip.1080p.DD5.1.H265-d3g.mkv to /home/XXX/Downloads/gmedia/TV/Ozark/Season 1/Ozark - S01E07 - Nest Box WEBRip-1080p.mkv
20-4-3 10:49:15.4|Debug|DiskTransferService|Move [/home/XXX/Downloads/gmedia/TV/Ozark/Season 1/Ozark.S01E07.Nest.Box.WEBRip.1080p.DD5.1.H265-d3g.mkv] > [/home/XXX/Downloads/gmedia/TV/Ozark/Season 1/Ozark - S01E07 - Nest Box WEBRip-1080p.mkv]

I'm using rclone v1.50.2. If I try to manually rename the same file with the same user without sudo permissions it works without any issues, so I think rclone and mergerfs is setup properly. Is there something in Sonarr I have to change so that it works better with rclone/mergerfs?

Thanks.

Yeah its a known issue. I resorted to not renaming files at all, hasn't been a problem tbh.

It depends on how mono handles the call underneath as most of the time it tries to do a hard link, which fails, which is why is generates a copy instead.

I had a post here as you can put Sonarr in trace and see the call:

I haven't retested in later versions of mono to see and you can do the rename via a script or something else / filebot and just refresh in Sonarr/Radarr.

Hi,

Thanks, it's not ideal but still I will use the workaround. Thanks for the help.

Yeah, it's a bit beyond me as I think rclone would need to take that link and do a move? Not sure, but maybe @ncw has a though as I don't think it's an easy thing to solve on the rclone side.

Looks like the upstream fix in dotnet and mono just got merged a day ago which will come with 6.12.x and there are PR's already in place to backport the fix to 6.10.x.

For those interested in tracking the progress:

Upstream Mono Fix: https://github.com/mono/corefx/pull/395

PR for Mono 6.10.x : https://github.com/mono/mono/pull/19428
PR for Mono 6.12.x : https://github.com/mono/mono/pull/19426
PR for Mono Master : https://github.com/mono/mono/pull/19376

Thanks @Animosity022 and @darthShadow for the info. Will keep a look out for that fix, so hopefully it's sorted for everyone.

@Animosity022 @darkavenger

The sonarr team decided to add a local workaround for now till Mono 6.10 is released. It should be fixed in 3.0.3.761.

Issue on Sonarr GH : https://github.com/Sonarr/Sonarr/issues/3681

1 Like

Thanks, I'll give it a go.

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