Trying to Hardlink after moving #3036

Closed
opened 2026-02-20 05:12:20 -05:00 by deekerman · 3 comments
Owner

Originally created by @edsenabr on GitHub (Apr 18, 2020).

Describe the bug

The server where nzbget and sonarr are running is different from the server where the TV Shows are being stored, and I've configured Sonarr to move the files from one server to the other by mounting the destination server at the Sonarr server using NFS.

When importing the downlad, Sonarr is trying to create a Hardlink from a '.backup~' file at
destination to the origin file, what evidently won't be possible because not only these are 2 different filesystems, but also they reside on different servers. Here's the snippet of the log when the error occurs:

20-4-18 15:08:36.3|Debug|EpisodeFileMovingService|Moving episode file: /downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv to /volume1/video/TV Shows/Black Mirror/S05/S05E01 - Striking Vipers.mkv
20-4-18 15:08:36.3|Debug|DiskTransferService|Move [/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv] > [/volume1/video/TV Shows/Black Mirror/S05/S05E01 - Striking Vipers.mkv]
20-4-18 15:08:36.5|Debug|DiskProvider|Hardlink '/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv' to '/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv.backup~' failed.

[v3.0.3.757] 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 <f3128ce8e42745968770fc144d56f821>:0 
  at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00004] in <f3128ce8e42745968770fc144d56f821>:0 
  at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000c] in <f3128ce8e42745968770fc144d56f821>:0 
  at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:342 

Because of this error, all downlads are being kept on the 'Queue' as 100%, but never finishes... I coudn't find any option to disable this Hardlinking behaviour, how can I do it ?

System Information

  • Sonarr Version: 3.0.3.757
  • Operating System: Linux
  • mono Version: 6.8.0.105
Originally created by @edsenabr on GitHub (Apr 18, 2020). **Describe the bug** The server where nzbget and sonarr are running is different from the server where the TV Shows are being stored, and I've configured Sonarr to move the files from one server to the other by mounting the destination server at the Sonarr server using NFS. When importing the downlad, Sonarr is trying to create a Hardlink from a '.backup~' file at destination to the origin file, what evidently won't be possible because not only these are 2 different filesystems, but also they reside on different servers. Here's the snippet of the log when the error occurs: ``` 20-4-18 15:08:36.3|Debug|EpisodeFileMovingService|Moving episode file: /downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv to /volume1/video/TV Shows/Black Mirror/S05/S05E01 - Striking Vipers.mkv 20-4-18 15:08:36.3|Debug|DiskTransferService|Move [/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv] > [/volume1/video/TV Shows/Black Mirror/S05/S05E01 - Striking Vipers.mkv] 20-4-18 15:08:36.5|Debug|DiskProvider|Hardlink '/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv' to '/downloads/TV/Black.Mirror.S05.E01.WebRip.Dual.Audio.Hindi.5.1..English.5.1.720p.x264.AAC.ESub.-Cinemas/6a52627b4f08114ce5626fb0729a4dde.mkv.backup~' failed. [v3.0.3.757] 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 <f3128ce8e42745968770fc144d56f821>:0 at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00004] in <f3128ce8e42745968770fc144d56f821>:0 at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000c] in <f3128ce8e42745968770fc144d56f821>:0 at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:342 ``` Because of this error, all downlads are being kept on the 'Queue' as 100%, but never finishes... I coudn't find any option to disable this Hardlinking behaviour, how can I do it ? **System Information** - Sonarr Version: 3.0.3.757 - Operating System: Linux - mono Version: 6.8.0.105
deekerman 2026-02-20 05:12:20 -05:00
Author
Owner

@Taloth commented on GitHub (Apr 18, 2020):

I'm not seeing any error, only debug messages.

@Taloth commented on GitHub (Apr 18, 2020): I'm not seeing any error, only debug messages.
Author
Owner

@edsenabr commented on GitHub (Apr 18, 2020):

@Taloth , what about the 'System.InvalidOperationException: Operation not permitted' ?! It's keeping the import process to go thru. The import process of all my items simply dies after that message.

@edsenabr commented on GitHub (Apr 18, 2020): @Taloth , what about the 'System.InvalidOperationException: Operation not permitted' ?! It's keeping the import process to go thru. The import process of all my items simply dies after that message.
Author
Owner

@markus101 commented on GitHub (Apr 18, 2020):

That’s just Sonarr trying to hardline and it not being able to do so. That alone won’t prevent the import from occurring, it just can’t do it via hardlink. Post the full trace log for a failed import and link it here.

@markus101 commented on GitHub (Apr 18, 2020): That’s just Sonarr trying to hardline and it not being able to do so. That alone won’t prevent the import from occurring, it just can’t do it via hardlink. Post the full trace log for a failed import and link it here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Sonarr#3036
No description provided.