[SOLVED] Sonarr copy & hardlink failure: InvalidOperationException

Sonarr version 2.0.0.4949:
Mono version 4.2.3:
OS: Lubuntu
((Debug logs)): https://pastebin.com/Gu7qmjR8
Description of issue:
Importing completed downloads from Deluge is failing. Presumed it was a permission issue, but Sonarr is running as root and has been added to all correct groups (as if it needs it?). System is a Lubuntu running in a Virtualbox, host is also Lubuntu. Files are downloaded to a host shared folder and then to be moved to another shared folder on the host. Deluge running under user deluge has no issues writing / moving files around. Fresh installs with vanilla configs other than the minimum setup to test.

cat /etc/group | grep root

root:x:0:
vboxsf:x:999:admin,plex,deluge,root
deluge:x:124:admin,root

Was really hoping to solve it on my own with all the other content available here, but it seems I’ve run out of ideas.

Hardlinking is only supported within a single volume.
If you disable hardlinking in Sonarr does it fail?

Its actually disabled. And strangely, some series work just fine.

Okay, it’s just Sonarr’s internal hardlinking before moving across a volume that’s failing (in case there problems with the move, which happens in some configurations).

Different permissions on the downloaded files or the series/season folder between series that work and those that don’t?

Okay so a few days later I was able to get some more info. Seems that directory creation was failing, and Sonarr was unable to create a new season folder. I couldnt sudo mkdir insde the guest VM either, so I suspected the VirtualBox permissions were still incorrect somehow. Looks like VirtualBox is running under host-user, and Sonarr is running as root:root inside the VM. Even though the final media location was owned by root:root, the shared folder translates alls VM guest users to host-user. The seemingly random series that would work happened to be owned by host-user. I chown'd a few folders to test and Sonarr is working again. The more helpful logs I finally saw are below so that others can identify a similar issue.

Couldn't import episode /media/sf_vm-share/complete/Bobs.Burgers.S08E03.720p.WEB.x264-TBS[rarbg]/bobs.burgers.s08e03.720p.web.x264-tbs.mkv: Could not find a part of the path.
Unable to apply permissions to: /media/sf_shows/Bob's Burgers/Season 08: Error setting file permissions: ENOENT
Unable to create directory: /media/sf_shows/Bob's Burgers/Season 08: Win32 IO returned ERROR_GEN_FAILURE. Path: /media/sf_shows/Bob's Burgers/Season 08
1 Like

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