Sonarr version (exact version): 4.0.11.2680
Mono version (if Sonarr is not running on Windows): 6.0.13
OS: Linux Mint 21 (but ready to upgrade to 22 since pyMedusa is broken now, it was the only thing holding me back)
Debug logs: Below
Description of issue:
Hard links aren’t working, it’s copying the file instead. I am trying to hard link to a different directory on the same drive. The directory called “1Unsorted” is where Qbittorrent puts the downloads. The directory “0Sorted” is the directory of shows, where each show has its own directory, and there are directories under those numbered by each season. This was working under Medusa, where everything in the 0Sorted directory of shows was owned by user medusa and group medusa - but there weren’t any actual files in those folders, it was just a bunch of links so that Plex could index it easily. Both the 0Sorted and the 1Unsorted directories are set to 777 permissions. The drive mount is owned by my main login account’s username, and owned by the group that has the same name as my username, but I’ve got the top level of the whole drive mount set to 777. I tried adding sonarr to the group that’s the same name as my username. I’m using Qbittorrent, and I’m running everything natively, no containers. The files that Qbittorrent downloads are owned by my account’s username and the group that has the same name as my username, with permissions 664. I started setting up Sonarr by having it import my existing Medusa show folders, but I also have gone ahead and deleted one of those folders, then had Sonarr re-add it - so now Sonarr is owner of the show directory in the example below, but I’m still having the same problem. (My OS is on an SSD, this media drive is an HDD. I do have symlinks in ~/Videos/ on the SSD to this DVR directory on the HDD, and I had tried using those ~/Videos/DVR/ paths at first - but I switched it to the absolute HDD mount paths shown below, and I’m still having the same problem.)
Debug log lines are below.
Thank you!!
2024-12-09 23:09:59.2|Debug|EpisodeFileMovingService|Attempting to hardlink episode file: /media/[my_username]/[drive_mount_name]/Videos/DVR/1Unsorted/[episode_file_name].mkv to /media/[my_username]/[drive_mount_name]/Videos/DVR/0Sorted/[show_name]/Season 4/[episode_file_name].mkv
2024-12-09 23:09:59.2|Debug|DiskTransferService|HardLinkOrCopy [/media/[my_username]/[drive_mount_name]/Videos/DVR/1Unsorted/[episode_file_name].mkv] > [/media/[my_username]/[drive_mount_name]/Videos/DVR/0Sorted/[show_name]/Season 4/[episode_file_name].mkv]
2024-12-09 23:09:59.2|Debug|DiskProvider|Hardlink ‘/media/[my_username]/[drive_mount_name]/Videos/DVR/1Unsorted/[episode_file_name].mkv’ to ‘/media/[my_username]/[drive_mount_name]/Videos/DVR/0Sorted/[show_name]/Season 4/[episode_file_name].mkv’ failed.
[v4.0.11.2680] System.InvalidOperationException: Operation not permitted
—> Mono.Unix.UnixIOException: Operation not permitted [EPERM].
— End of inner exception stack trace —
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError()
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf(Int32 retval)
at Mono.Unix.UnixFileSystemInfo.CreateLink(String path)
at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink(String source, String destination) in ./Sonarr.Mono/Disk/DiskProvider.cs:line 444
2024-12-09 23:10:00.1|Debug|EpisodeService|Linking [Season 4/[episode_file_name].mkv] > [[10748]Patience]
2024-12-09 23:10:00.2|Debug|CompletedDownloadService|All episodes were imported for [episode_file_name].mkv
2024-12-09 23:10:00.2|Debug|DownloadEventHub|[[episode_file_name].mkv] Marking download as imported from qBittorrent