Not able to hardlink

Sonarr version (exact version): 2.0.0.5322
Mono version (if Sonarr is not running on Windows): 5.20.1.19
OS: CentOS 7

Debug logs:

19-6-8 15:24:59.3|Debug|DiskProvider|Hardlink ‘/media/tv/Designated.Survivor.S03E06.720p.WEB.X264-AMCON/Designated.Survivor.S03E06.720p.WEB.X264-AMCON.mkv’ to ‘/media/tv/Designated Survivor/Season 3/Designated Survivor/Designated.Survivor.S03E06.720p.WEB.X264-AMCON.mkv’ failed. [v2.0.0.5322] System.InvalidOperationException: Operation not permitted —> Mono.Unix.UnixIOException: Operation not permitted [EPERM]. — End of inner exception stack trace — at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00005] in <c1c3aabcae9e482aa662056b42aff7cd>:0 at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00004] in <c1c3aabcae9e482aa662056b42aff7cd>:0 at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000c] in <c1c3aabcae9e482aa662056b42aff7cd>:0 at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in <b81596df5dc24e8a9110ca1cc8a9cd00>:0

Description of issue:

Noticed that I’m using a lot of storage and upon investigation using ls -i, found that Sonarr was copying instead of hardlinking files as it moves them, so I’m getting duplicates. Hardlinking is the setting configured on my Settings page, so after some Googling, was told to look for the “why” in the Debug logs. This is what it’s saying but I’m not sure I understand what the error is telling me.

The short answer is permissions.

The longer answer is likely due to lack of permissions on the source file, since a hardlink requires write access to the file and it likely doesn’t have that. Manually trying to hardline may give some more information on why it failed.

We also recommend not mixing sorted and unsorted files. /media/tv/downloads Instead of dropping the downloads right in /media/tv keeps things clean (and on the same volume still).

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