Multiple datasets to one mount point?

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
So here's the thing, I had a dataset earlier called Downloads and in that folders for "Unsorted Series", "Series" etc etc. but I wanted to get a better overview so I created a dataset called "Media" and subdatasets in that one for "Series", "Movies" etc. so that I could see how much space each category is taking up!
And here the problem arises! I first tried using the "Media" dataset as a mount point for Sonarr/Radarr but that meant they couldn't see the underlying datasets so Instead I made 2 mount points, lets take Sonarr as an example.

Mountpoint 1: /mnt/Tank/Downloads/Unsorted Series/ → /mnt/Tank/iocage/jails/sonarr/mnt/Unsorted Series
Mountpoint 2: /mnt/Tank/Media/TV-Series/ → /mnt/Tank/iocage/jails/sonarr/mnt/TV-Series

Sonarr can view and edit both directories but can't make a hardlink between them, just copy and move. When I tried I got an error
Code:
Cross-device link [EXDEV]
telling me i’ts across volumes and not supported.

So I made a new folder called "series mountpoint" and made 2 symlinks in there like this:
Code:
root@Katrinelund:/mnt/Tank/Downloads/Series Mountpoint # ls -l
total 1
lrwxr-xr-x  1 root  wheel  36 Dec 18 07:50 Series -> /mnt/Tank/Downloads/Series/
lrwxr-xr-x  1 root  wheel  45 Dec 18 07:50 Unsorted Series -> /mnt/Tank/Downloads/Unsorted Series/


I then made a single mountpoint from the "Series Mountpoint" folder to the "sonarr/mnt" and checking in the CLI I can see the folders:
Code:
root@Katrinelund:/mnt/Tank/iocage/jails/sonarr/root/mnt # ls -l
total 1
lrwxr-xr-x  1 root  wheel  36 Dec 18 07:50 Series -> /mnt/Tank/Downloads/Series/
lrwxr-xr-x  1 root  wheel  45 Dec 18 07:50 Unsorted Series -> /mnt/Tank/Downloads/Unsorted Series/


But checking from Sonarr it can't see any of the folders:
1576653790212.png


Any ideas?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Symbolic links aren't going to work in a jail.

You need to mount each dataset directly in the jail where you expect to see it.

You may also want to consider permissions of those directories and files and compare to the UID of the sonarr app in the jail.
 

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
Symbolic links aren't going to work in a jail.

You need to mount each dataset directly in the jail where you expect to see it.
crap, but it seems that sonarr can't link between 2 different mount points?

I tried last night with a setup that looks like this with 2 mount points for sonarr:
1576665234178.png

But got this error message:
Code:
19-12-17 10:00:01.8|Debug|EpisodeFileMovingService|Hardlinking episode file: /mnt/Unsorted Series/Doom.Patrol.S01.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv to /mnt/Series/Doom Patrol/S01/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv
19-12-17 10:00:01.8|Debug|DiskTransferService|HardLinkOrCopy [/mnt/Unsorted Series/Doom.Patrol.S01.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv] > [/mnt/Series/Doom Patrol/S01/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv]
19-12-17 10:00:01.8|Debug|DiskProvider|Hardlink '/mnt/Unsorted Series/Doom.Patrol.S01.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv' to '/mnt/Series/Doom Patrol/S01/Doom.Patrol.S01E06.NORDiC.720p.WEBRip.DDP5.1.x264-DBRETAiL.mkv' failed.

[v2.0.0.5338] Mono.Unix.UnixIOException: Cross-device link [EXDEV].
  at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00000] in /wrkdirs/usr/ports/lang/mono/work/mono-5.10.1.57/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs:478
  at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00004] in /wrkdirs/usr/ports/lang/mono/work/mono-5.10.1.57/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs:491
  at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000c] in /wrkdirs/usr/ports/lang/mono/work/mono-5.10.1.57/mcs/class/Mono.Posix/Mono.Unix/UnixFileSystemInfo.cs:278
  at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:182

Cross-Device link is apparently because it's 2 mountpoints!
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You can mount Series and Unsorted Series both as subdirectories of /mnt/ in the jail... I don't get what you're saying Sonarr's problem is.

What are your jail mounts for the Sonarr Jail?
 

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
I created 2 different mount points
/mnt/Katrinelund_2/Downloads/Unsorted Series → /mnt/Katrinelund/iocage/jails/sonarr/root/mnt/Unsorted Series
/mnt/Katrinelund_2/Downloads/Series → /mnt/Katrinelund/iocage/jails/sonarr/root/mnt/Series

But sonarr couldn't make a hardlink from `mnt/Unsorted Series` to `mnt/Series` and was complaining about a cross-device link.
Earlier when I was running just one mountpoint to "Downloads" it worked just fine, change is that it's 2 different mounts for the jail now.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't think we're talking about the same thing.

Please show the output of:

iocage fstab sonarr -l

Change the jail name if necessary.
 

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
Okidoki, here it is

Code:
root@Katrinelund:/mnt/Katrinelund_2/iocage/jails/sonarr/root/mnt # iocage fstab sonarr -l
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| INDEX |                                                                        FSTAB ENTRY                                                                        |
+=======+===========================================================================================================================================================+
| 0     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/bin        /mnt/Katrinelund_2/iocage/jails/sonarr/root/bin nullfs  ro      0       0                 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/boot       /mnt/Katrinelund_2/iocage/jails/sonarr/root/boot        nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 2     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/lib        /mnt/Katrinelund_2/iocage/jails/sonarr/root/lib nullfs  ro      0       0                 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 3     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/libexec    /mnt/Katrinelund_2/iocage/jails/sonarr/root/libexec     nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 4     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/rescue     /mnt/Katrinelund_2/iocage/jails/sonarr/root/rescue      nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 5     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/sbin       /mnt/Katrinelund_2/iocage/jails/sonarr/root/sbin        nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 6     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/bin    /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/bin     nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 7     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/include        /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/include nullfs  ro      0       0 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 8     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/lib    /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/lib     nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 9     | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/libexec        /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/libexec nullfs  ro      0       0 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 10    | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/sbin   /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/sbin    nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 11    | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/share  /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/share   nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 12    | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/libdata        /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/libdata nullfs  ro      0       0 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 13    | /mnt/Katrinelund_2/iocage/releases/11.2-RELEASE/root/usr/lib32  /mnt/Katrinelund_2/iocage/jails/sonarr/root/usr/lib32   nullfs  ro      0       0         |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 14    | /mnt/Katrinelund_2/Downloads/Unsorted Series    /mnt/Katrinelund_2/iocage/jails/sonarr/root/mnt/Unsorted Series nullfs  rw      0       0                 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| 15    | /mnt/Katrinelund_2/Media/TV-series      /mnt/Katrinelund_2/iocage/jails/sonarr/root/mnt/Series  nullfs  rw      0       0                                 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so mounts 14 and 15 look OK.

If the permissions are OK for those directories, Sonarr should happily see content there under /mnt/.

Symbolic links won't work between those 2 mounts though (I don't understand how that was involved in the first place... are you using some feature of Sonarr for that?)

Perhaps we need to look at the output from ls -l under /mnt in the jail.
 

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
The reason I want to make links is to keep sharing from "14" while Plex use the show sorted in "15" and Sonarr has a function for that. It worked before when I just had a single mount and a single dataset.
1576677857936.png


This is what my debug shows in Sonarr:
Code:
19-12-17 10:00:01.8|Debug|DiskProvider|Hardlink '/mnt/Unsorted Series/Doom.Patrol.S01/Doom.Patrol.S01E06.NORDiC.720p.mkv' to '/mnt/Series/Doom Patrol/S01/Doom.Patrol.S01E06.NORDiC.720p.mkv' failed.

[v2.0.0.5338] Mono.Unix.UnixIOException: Cross-device link [EXDEV].


So when trying to make a hardlink it fails and when I asked in the Sonarr forum they given Cross-device link [EXDEV] i’ts across volumes and not supported.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Basically to have what you want, you need it all to be under a single dataset. No amount of linking or mounting can make them a single filesystem, just a directory tree.
 

Naesstrom

Contributor
Joined
Jul 10, 2012
Messages
108
Basically to have what you want, you need it all to be under a single dataset. No amount of linking or mounting can make them a single filesystem, just a directory tree.
Sigh... was afraid of that! Guess I'll just start moving all the files back again! o_O
Thanks for not giving up on me @sretalla
 
Top