Sonarr/Radarr - hardlink not working

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows): 2
OS: OpenMediaVault - Docker
Debug logs:
Description of issue: Hardlink not working

Hello guys,

I’m having a little problem with Sonarr/Radarr and hardlinking. So, I ran a machine with OpenMedaVault, in which I have Docker, that keeps Sonarr/Radarr/QBit and a 1TB drive, shared.
Volumes are set like this:
Sonarr: /srv/dev-disk-by-uuid-ebf7cea5-3f2c-480c-9251-9ae227bb32e6:/data
Radarr: /srv/dev-disk-by-uuid-ebf7cea5-3f2c-480c-9251-9ae227bb32e6:/data
QBit: /srv/dev-disk-by-uuid-ebf7cea5-3f2c-480c-9251-9ae227bb32e6:/data

dev-disk-by-uuid-ebf7cea5-3f2c-480c-9251-9ae227bb32e6 being the disk used.
Inside, there is a folder name Media, which contains 3 more folders: Torrent, Movies, TV. Qbit place downloads in Torrent, and the Sonarr/Radarr should harlink them in Movies/TV. Root folders are set to /data/Media/TV for Sonarr and /data/Media/Movies for Radarr.

But Sonarr/Radarr refuses to hardlink stuff (the option is checked) and just copy the same file in their folers. I have now 100GB of movies and 200GB of TV shows, but the space ocupied on disk is 600GB, so exactly double.

From a log, I could get this:

2023-08-04 03:05:58.8|Debug|EpisodeFileMovingService|Hardlinking episode file: /data/Media/Torrent/Silo.S01.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv to /data/Media/TV/Silo/Season 1/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv
2023-08-04 03:05:58.8|Debug|DiskTransferService|HardLinkOrCopy [/data/Media/Torrent/Silo.S01.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv] > [/data/Media/TV/Silo/Season 1/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv]
2023-08-04 03:05:58.8|Debug|DiskProvider|Hardlink '/data/Media/Torrent/Silo.S01.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv' to '/data/Media/TV/Silo/Season 1/Silo.S01E01.Freedom.Day.1080p.ATVP.WEB-DL.DDP5.1.H.264-NTb.mkv' failed.

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

Any ideas? What I am missing?

Ok, fixed it. Seem like I had a different PUID for Sonarr/Radarr and that is was permission error. After I set the correct PUID (the one for the user in OMV), everythings works as supposed. Case closed!

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