Guide: How To Use Rclone To Mount Cloud Drives And Play Files


DZMM

Recommended Posts

10 hours ago, animeking said:

hello when i followed the guide i got everything working except mount_unionfs folder. there is nothing in the folder. is there a step im missing for mount_unionfs to work???? 

 

 

Is there not a folder at /mnt/user/mount_mergerfs?

Link to comment
On 4/15/2021 at 12:19 PM, Stephan296 said:

I have got the problem that sonarr can't import the media because he don't have the rights....
When i use unraid to get them new rights it will be fixed for a couple of minutes, after that time i get the same error again.
Sonarr is the only container with this problem. I use PGID 100 and PUID 99 to run this container.
I have mounted the /mnt/user  as /user in the container

has somebody a solution?

Somebody?

Link to comment

i cannot understand one thing.

I have mount_rclone with all my Movies/TV, should I just map sonarr and radarr directly to that mount or do I have to mount in someowhere else (mount_mergerfs)?

This is part of my mount script (part that I changed)

 

RcloneRemoteName="storage_crypt" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data
RcloneMountShare="/mnt/user/mount_rclone" # where your rclone remote will be located without trailing slash  e.g. /mnt/user/mount_rclone
RcloneMountDirCacheTime="720h" # rclone dir cache time
LocalFilesShare="/mnt/user/media" # location of the local files and MountFolders you want to upload without trailing slash to rclone e.g. /mnt/user/local. Enter 'ignore' to disable
RcloneCacheShare="/mnt/user0/mount_rclone" # location of rclone cache files without trailing slash e.g. /mnt/user0/mount_rclone
RcloneCacheMaxSize="400G" # Maximum size of rclone cache
RcloneCacheMaxAge="336h" # Maximum age of cache files
MergerfsMountShare="/mnt/user/mount_mergerfs" # location without trailing slash  e.g. /mnt/user/mount_mergerfs. Enter 'ignore' to disable

 

Link to comment
2 hours ago, INTEL said:

I have mount_rclone with all my Movies/TV, should I just map sonarr and radarr directly to that mount or do I have to mount in someowhere else (mount_mergerfs)?

 

You want to map them to the /mnt/user/mount_mergerfs. That is the combination of your local files and rclone cache/mounted folder.

Link to comment
On 4/15/2021 at 6:19 AM, Stephan296 said:

I have got the problem that sonarr can't import the media because he don't have the rights....
When i use unraid to get them new rights it will be fixed for a couple of minutes, after that time i get the same error again.
Sonarr is the only container with this problem. I use PGID 100 and PUID 99 to run this container.
I have mounted the /mnt/user  as /user in the container

has somebody a solution?

 

If you do an "ls -l" in the directory of where the files downloaded, what are the permissions/owner of the files?

Link to comment
50 minutes ago, Roudy said:

 

You want to map them to the /mnt/user/mount_mergerfs. That is the combination of your local files and rclone cache/mounted folder.

Nice, thanks.

And about this part:

LocalFilesShare="/mnt/user/media"

I used to have sonarr and radarr mobve files here /mnt/user/media/TV and /mnt/user/media/Movies

Is this path for that?

Edited by INTEL
Link to comment
6 minutes ago, axeman said:

 

why do this on UnRaid. My windows machine maps to the unraid shares for Emby, Sonarr etc. 

I don't have windows machine there, only unraid with jellyfin. Server 1 is in my main place where I live (this is where I download all the stuff), and server 2 is in my vacation house where I just want to watch TV shows, but I have better download speed If I mount rclone instead of streaming from my place.

 

I presume I would just use mount script, not upload for server 2.

 

Main problem is server 1 where everything is happening. Downloading with deluge, sonarr moving files.

I cannot figure it out. What do I map where? sonarr should map to mergedfs? deluge also?

So jellyfin maps mount_rclone or mount_mergerfs?

Edited by INTEL
Link to comment
3 hours ago, INTEL said:

I used to have sonarr and radarr mobve files here /mnt/user/media/TV and /mnt/user/media/Movies

Is this path for that?

 

That path is for files that you want to upload to rclone. You still point everything to the mergerfs and it handle the rest. Files awating upload will be there until the upload script runs.

Link to comment
4 hours ago, INTEL said:

To sum it up....

 

I have 2 unraid servers

Server no1: would need to download files with sonarr/radarr/delugeVPN and move it to rclone_mount

Server no2: Only to stream that files from rclone_mount

 

Any idea how to set it up?

 

I run a similar setup. Server number 2 wouldn't need the mergerfs since it is not downloading/uploading any content to cloud storage. You would just have to mount the rclone instance as a "Read" and use the same encryption keys. I personally created seperate oauth accounts to avoid API limits. Hope that helps.

Link to comment
3 hours ago, Stephan296 said:

@Roudydrwxrwxrwx 1 nobody users.

 

Nzbget works great and sonarr can access all the (already downloaded) media but can't import the downloaded files which he has still to do.

 

Is there an error in the Sonarr logs at all? Could you post the error or what it says during the import?

Link to comment
47 minutes ago, Roudy said:

 

I run a similar setup. Server number 2 wouldn't need the mergerfs since it is not downloading/uploading any content to cloud storage. You would just have to mount the rclone instance as a "Read" and use the same encryption keys. I personally created seperate oauth accounts to avoid API limits. Hope that helps.

Could you share ur mount script?

Link to comment
2 hours ago, INTEL said:

Could you share ur mount script?

 

My script is for a Windows computer. It's really just an rclone mount without a cache. For another unRAID box, you would just need to modify the mount script and just use the rclone mount section without the use of a cache. I make my mount a read only on the remote box to prevent files from being altered. 

Link to comment
8 hours ago, Roudy said:

 

My script is for a Windows computer. It's really just an rclone mount without a cache. For another unRAID box, you would just need to modify the mount script and just use the rclone mount section without the use of a cache. I make my mount a read only on the remote box to prevent files from being altered. 

I managedbto make things work on main server, radarr adding movies, upload script uploading, but second server doesn't pick up new movies, I can see only data I had uploaded before running mount script. Any idea what could it be?

Also thank's for all ur help

Link to comment
20 hours ago, Roudy said:

 

Is there an error in the Sonarr logs at all? Could you post the error or what it says during the import?

@Roudy

[v3.0.6.1196] System.UnauthorizedAccessException: Access to the path is denied.
  at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00116] in <254335e8c4aa42e3923a8ba0d5ce8650>:0 
  at NzbDrone.Common.Disk.DiskProviderBase.MoveFileInternal (System.String source, System.String destination) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:268 
  at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal (System.String source, System.String destination) [0x000a3] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:306 
  at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, System.Boolean overwrite) [0x000e1] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:255 
  at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified (System.String sourcePath, System.String targetPath, System.Int64 originalSize) [0x00047] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:487 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite) [0x004b9] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:367 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List`1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x00129] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:116 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00046] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:79 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x001ab] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:77 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x0029b] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:109 

 

Link to comment
8 hours ago, INTEL said:

second server doesn't pick up new movies, I can see only data I had uploaded before running mount script.

 

I'm assuming you are using Plex. On the remote computer, it won't detect the file changes. You will have to manually scan the files or set it to scan periodically. There is also an "Autoscan" docker from Hotio in the APP store that may trigger the scanning as well. I haven't set it up on my remote box because the periodic scanning works fine for my case. 

Link to comment
2 hours ago, Stephan296 said:

@Roudy


[v3.0.6.1196] System.UnauthorizedAccessException: Access to the path is denied.
  at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00116] in <254335e8c4aa42e3923a8ba0d5ce8650>:0 
  at NzbDrone.Common.Disk.DiskProviderBase.MoveFileInternal (System.String source, System.String destination) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:268 
  at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal (System.String source, System.String destination) [0x000a3] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:306 
  at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, System.Boolean overwrite) [0x000e1] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:255 
  at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified (System.String sourcePath, System.String targetPath, System.Int64 originalSize) [0x00047] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:487 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite) [0x004b9] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:367 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List`1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x00129] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:116 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00046] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:79 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x001ab] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:77 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x0029b] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:109 

 

 

Are the files local on unRAID or on a remote system? Which Sonarr docker are you using?

 

Can you verify the "Root Folers" path is correct under "Settings>Media Management"

 

Also, you can try to run the "Docker Safe New Perms" under "Tools" to see if that helps as well.

Link to comment
On 4/20/2021 at 3:55 PM, Roudy said:

 

I'm assuming you are using Plex. On the remote computer, it won't detect the file changes. You will have to manually scan the files or set it to scan periodically. There is also an "Autoscan" docker from Hotio in the APP store that may trigger the scanning as well. I haven't set it up on my remote box because the periodic scanning works fine for my case. 

Nope, using jellyfin, but same thing.

Actualy what I find is that my remote server isn't aware of new uploads, cannot figure out why?

What I mean by that is, when main server upload's "NEW MOVIE", I cannot see that "NEW MOVIE" in remote server mount.

 

Meybe cache?

 

Still not shure how would my mount script should look like on remote server?

I currently have this:

 

# REQUIRED SETTINGS
RcloneRemoteName="storage_crypt" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data
RcloneMountShare="/mnt/user/mount_rclone" # where your rclone remote will be located without trailing slash  e.g. /mnt/user/mount_rclone
RcloneMountDirCacheTime="720h" # rclone dir cache time
LocalFilesShare="ignore" # location of the local files and MountFolders you want to upload without trailing slash to rclone e.g. /mnt/user/local. Enter 'ignore' to disable
RcloneCacheShare="/mnt/cache/mount_rclone" # location of rclone cache files without trailing slash e.g. /mnt/user0/mount_rclone
RcloneCacheMaxSize="400G" # Maximum size of rclone cache
RcloneCacheMaxAge="336h" # Maximum age of cache files
MergerfsMountShare="ignore" # location without trailing slash  e.g. /mnt/user/mount_mergerfs. Enter 'ignore' to disable
DockerStart="Jellyfin-AMD-Intel-Nvidia" # list of dockers, separated by space, to start once mergerfs mount verified. Remember to disable AUTOSTART for dockers added in docker settings page

 

Edited by INTEL
Link to comment
1 hour ago, INTEL said:

Actualy what I find is that my remote server isn't aware of new uploads, cannot figure out why?

 

How often is your upload script running? Can you manually run it and see if it appears on your remote computer?

 

1 hour ago, INTEL said:

Still not shure how would my mount script should look like on remote server?

 

You will just have to use the first part of the script (Create Rclone Mount). You won't need anything after that. I caution about using a cache with the rclone mount if you are just reading as well. I say this because if you update a file on your system and it isn't the same file extension, it won't overwrite the existing media if its in cache. This will make the media server see duplicate files for the same media. It will eventually work itself out due to cache size/time, but something to be aware of.

  • Thanks 1
Link to comment
15 hours ago, Roudy said:

How often is your upload script running? Can you manually run it and see if it appears on your remote computer?

It's running every hour.

It does upload, files I'm shure, just remote server doesnt see it (mount only)

 

One last thing about that remote server. Should I edit something in my script, or did I set it up corectly? I don't understand that bit about cache. Not shure how to disable rest of the script and leave mount only part?

Link to comment

Having a few teething problems with this guide:

 

1. On a server restart or array restart the mount it says the secure folder already exist

If I delete the folder Gmerged/secure/secure its starts correctly - it seems like i've got another 'secure' folder in the secure folder - both have movies, downloads etc in them

 

2. Radarr and sonarr aredownloading the files ok but are not exporting them out the queue - they seem to be being put in the secure folder in the secure folder.

 

Mount script settings are

 

# REQUIRED SETTINGS
RcloneRemoteName="secure" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data
RcloneMountShare="/mnt/user/GDrive" # where your rclone remote will be located without trailing slash  e.g. /mnt/user/mount_rclone
RcloneMountDirCacheTime="720h" # rclone dir cache time
LocalFilesShare="/mnt/user/Glocal" # location of the local files and MountFolders you want to upload without trailing slash to rclone e.g. /mnt/user/local. Enter 'ignore' to disable
RcloneCacheShare="/mnt/user0/GDrive" # location of rclone cache files without trailing slash e.g. /mnt/user0/mount_rclone
RcloneCacheMaxSize="400G" # Maximum size of rclone cache
RcloneCacheMaxAge="336h" # Maximum age of cache files
MergerfsMountShare="/mnt/user/GMerged" # location without trailing slash  e.g. /mnt/user/mount_mergerfs. Enter 'ignore' to disable
DockerStart="nzbget plex sonarr radarr ombi" # list of dockers, separated by space, to start once mergerfs mount verified. Remember to disable AUTOSTART for dockers added in docker settings page
MountFolders=\{"downloads/complete,downloads/intermediate,downloads/seeds,movies,tv"\} # comma separated list of folders to create within the mount
# Note: Again - remember to NOT use ':' in your remote name above

 

Upload settings are 

 

RcloneCommand="move" # choose your rclone command e.g. move, copy, sync
RcloneRemoteName="secure" # Name of rclone remote mount WITHOUT ':'.
RcloneUploadRemoteName="secure" # If you have a second remote created for uploads put it here.  Otherwise use the same remote as RcloneRemoteName.
LocalFilesShare="/mnt/user/Glocal" # location of the local files without trailing slash you want to rclone to use
RcloneMountShare="/mnt/user/GDrive" # where your rclone mount is located without trailing slash  e.g. /mnt/user/mount_rclone
MinimumAge="15m" # sync files suffix ms|s|m|h|d|w|M|y
ModSort="ascending" # "ascending" oldest files first, "descending" newest files first

 

is the setting RcloneUploadRemoteName="secure" the problem?

Link to comment
On 4/23/2021 at 2:40 AM, INTEL said:

It's running every hour.

It does upload, files I'm shure, just remote server doesnt see it (mount only)

 

If the files are uploaded, you should see them on the remote PC. They are either there or they're not, so make sure you are mounting and uploading to the same location.

 

On 4/23/2021 at 2:40 AM, INTEL said:

I don't understand that bit about cache. Not shure how to disable rest of the script and leave mount only part?

 

You can keep the cache, just be aware that if you update a file it may appear as a duplicate. It won't really improve performance unless you access the same file multiple times. It will download it the initial time and then play from cache after that. Hope that makes sense.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.