Sonarr version (exact version): 2.0.0.5228
Mono version (if Sonarr is not running on Windows): Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1)
OS: Debian 9.5 (inside a proxmox VM)
Debug logs: https://www.dropbox.com/s/jklcvuaqzcb8tp9/sonarr.trace.22.txt.zip?dl=0
Description of issue: Import fails because sonarr cannot make a local backup copy?
I am very happy with sonarr:
shows detection works
interface with sabnzb works
What does not work is automatic import at the end of a download.
Sonarr detects as expected the end of the download. The downloaded files are in a folder where the sonarr user has read/write rights.
I can see the show being copied to the target directory until the copy is complete and then, sonarr decides it wants to rollback and deletes the show from the target directory.
Those steps show this should not be a rights issue.
And this is were my problem must lay: both the download folder and the target “shows” folder are on different NFS mounts.
A look at the logs show
18-9-15 22:49:06.6|Debug|EpisodeFileMovingService|Moving episode file: /data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv to /data/MediaNFS/series/Simpsons/Saison29/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS.mkv
18-9-15 22:49:06.6|Debug|DiskTransferService|Move [/data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv] > [/data/MediaNFS/series/Simpsons/Saison29/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS.mkv]
18-9-15 22:49:06.6|Trace|SymbolicLinkResolver|Checking path /data/MediaNFS/series/Simpsons/Saison29/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS.mkv for symlink returned error ENOENT, assuming it’s not a symlink.
18-9-15 22:49:06.6|Trace|DiskTransferService|Attempting to move hardlinked backup.
18-9-15 22:49:06.6|Debug|DiskProvider|Hardlink ‘/data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv’ to ‘/data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv.backup~’ failed.[v2.0.0.5228] System.InvalidOperationException: Opération non permise —> Mono.Unix.UnixIOException: Opération non permise [EPERM].
— End of inner exception stack trace —
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00005] in :0
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00007] in :0
at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000d] in :0
at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:18218-9-15 22:49:06.6|Trace|DiskTransferService|Hardlink move failed, reverting to move.
18-9-15 22:49:11.6|Debug|DiskTransferService|Rolling back incomplete file move [/data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv] to [/data/MediaNFS/series/Simpsons/Saison29/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS.mkv].
18-9-15 22:49:14.6|Trace|DiskProviderBase|Deleting file: /data/MediaNFS/series/Simpsons/Saison29/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS.mkv
18-9-15 22:49:14.6|Warn|ImportApprovedEpisodes|Couldn’t import episode /data/download/Backlog/The.Simpsons.S29E08.REPACK.720p.HDTV.x264-KILLERS/6ecc4bcfc01c4f6b9e2b2596fd9bd131.mkv[v2.0.0.5228] System.UnauthorizedAccessException: Access to the path is denied.
As I understand, sonarr tries to make a local backup copy of the transfered file using a hardlink? Why ?
There is “Media management” setting “Use Hardlinks instead of Copy” (set to NO in my case) but it seems to only apply to torrents.
Once it has failed, the task is retried every minute, each time copying, then rollbacking.
At this point, if I do a manual import while selecting “copy” instead of “move” it works! (well if I am lucky to not interfere with the scheduled retry, because then, even the manual import fails, and I have to try again).
What I want to know is if there is a parameter or mecanism I am missing to disable the use of hardlinks on the source download directory?
Sonarr runs inside a VM with limited space regarding some of the downloads, thus I use a NFS mount from my NAS. If nothing else works, setting up an iscsi mount on the VM should allow hardlinks to work, but I would very much like to find a solution within sonarr and my current setup
Thanks in advance