[Support] Rclone-mount - with FUSE support for Plex/Emby/Sonarr etc. (beta)


Recommended Posts

Docker for Rclone FUSE mount feature (exposable to host and other docker containers, e.g. Plex, Nextcloud, glFTPd)

 

Application Name: Rclone-mount

Application Site: http://rclone.org/

Docker Hub: https://hub.docker.com/r/tynor88/rclone-mount/

Docker Store: https://store.docker.com/community/images/tynor88/rclone-mount

Github: https://github.com/tynor88/docker-rclone-mount

unRAID Template: https://github.com/tynor88/docker-templates/tree/master/tynor88

Setup/Configuration: https://rclone.org/commands/rclone_mount/

Supported Cloud Services:

  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • Dropbox
  • Google Cloud Storage
  • Amazon Drive
  • Microsoft One Drive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • The local filesystem

Creating the initial config file (.rclone.conf)

docker exec -it Rclone-mount rclone --config="/config/.rclone.conf" config
 
IMPORTANT Extra Parameters:
In order for the FUSE mount to be exposable to the host and other docker containers, these settings have to be in the Extra Parameters option in the "Advanced View" when setting up the Docker. I've already made them default in the CA template file.
--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared

With the above settings, the FUSE will be mounted to /mnt/disks/rclone_volume

 

Note if you cannot see the mount inside other dockers

This container must be started BEFORE other docker containers when sharing the FUSE mount. For automaticly fixing this at startup, use the great CA Docker Autostart Manager Plugin by @Squid

 

Feel free to post any questions/issues/requests relating to this docker in this thread.

Edited by thomast_88
  • Upvote 1
Link to comment

FAQ

Can I use my encrypted ACD/GDrive content with Plex and other dockers?

Yes, that's exactly the purpose of this container.

 

Can i haz unlimited space on my unRAID setup?

I think 233 TB is the maximum I've seen so far with Amazon Cloud Drive.

 

How do i create the .rclone.conf file?

docker exec -it Rclone-mount rclone --config="/config/.rclone.conf" config

 

I already have a .rclone.conf file from the rclone plugin, can I use it rather than creating a new one?

Sure, there are two ways:

  1. Mount the /config volume so it points to the directory which contains the .rclone.conf file. E.g.: -v "/boot/config/plugins/rclone-beta/":"/config":rw
  2. Copy it to: "/mnt/cache/appdata/rclone-mount/config/"

 

I cannot see my mounted volume/files outside of the container

  1. Make sure you have this in extra parameters (advanced view): --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared
  2. Make sure that this docker container is started before the container you are sharing the volume with.

 

Can i use the copy/sync features of rclone with this docker?

Use the other docker i made which supports that.

 

What are the best mount settings for Plex playback / transcoding?

  1. See this post
  2. And this discussion on the official rclone forum
  3. And ajkis wiki on GitHub

 

I want more verbose logging, so I can see what's going on

This is not entirely documented yet by rclone, but there is some discussion here.

Summarized, in the RCLONE_MOUNT_OPTIONS variable put:

  • -v flag for information logging
  • Or -vv for alot verbose logging

 

Why should I specify the /data mount in the Extra Parameters?

Because the unRAID docker GUI does not support the shared mount propagation options, which is required for the rclone FUSE mount to be shared with other containers. I've already opened a feature request to have this option available in the GUI.

This option has been added to the GUI by @bonienl and is no longer necessary.

 

Can I change the volume mapping of the mount from /mnt/disks/rclone_volume/ to another location?

Yes, in the Extra Parameters change the default value of -v /mnt/disks/rclone_volume/:/data:shared to -v <location>:/data:shared

 

Edited by thomast_88
Link to comment

Best mount settings for Cloud Services

 

  • Amazon Cloud Drive: 
    --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v

     

Edited by thomast_88
Link to comment
12 hours ago, RAINMAN said:

This looks very interesting.  I didn't have a lot of luck getting the plugin working how I wanted so I hope this is more successful.  

 

Thanks for the hard work on this.

 

Sure, I'd be happy to receive some feedback on this once you get it up and running.

Link to comment

Happy to help :)

 

When /mnt/disks/rclone_volume was created it was owned by root with 755 permissions. Quick chown/chmod fixed it but I was getting permission errors before that.

 

It might also be worth highlighting the ":" at the end of the value in the RCLONE_REMOTE_MOUNT key.

 

ie.

KEY: RCLONE_REMOTE_MOUNT

VALUE: GDrive: <<<< This colon is important

 

For testing it's wise to point at a smaller subfolder ie. GDrive:rclone (I'm impatient 9_9)

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

Happy to help :)

 

When /mnt/disks/rclone_volume was created it was owned by root with 755 permissions. Quick chown/chmod fixed it but I was getting permission errors before that.

 

It might also be worth highlighting the ":" at the end of the value in the RCLONE_REMOTE_MOUNT key.

 

ie.

KEY: RCLONE_REMOTE_MOUNT

VALUE: GDrive: <<<< This colon is important

 

For testing it's wise to point at a smaller subfolder ie. GDrive:rclone (I'm impatient 9_9)

 

Right, gotta fix that. I was using a folder which was created by @Waseh's plugin, so my permissions were ok.

Yes, i tried to make that clear in two places. (See screenshot). But you're right - it wouldn't work without a colon. I could perhaps check the variable at startup, and fail fast if there is no ":" specified.

Untitled.jpg

 

@MTA99 What do you mean by testing with a small sub folder? It shouldn't take any time to mount. I'm mounting 5 TB encrypted data in no time.

Edited by thomast_88
Link to comment

@thomast_88 It was only after 10mins (probably more) of looking through the logs/dockerfile etc. that I realised I'd overlooked the colon...... the colon that is in the two places you've pointed out :( I should read things more carefully I guess but if it saves the next guy/girl the time I'd make more of a deal of it

 

When I first mounted my drive I was trying to browse with MC over SSH - it hung - so I connected to a small subfolder and listing was instant. Connection here is good (100/100). Again, I'm probably too impatient

Link to comment

Any chance you can point me to an up to date tutorial on how to set up ACD and rclone to work with your docker. Pretty basic requirements just want to use ACD as an archive drive for older media using a local Plex server. Thanks

Link to comment
  • 4 weeks later...

I am trying to mount my google drive and i get 

ErrorWarningSystemArrayLogin


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...

GID/UID
-------------------------------------
User uid: 911
User gid: 911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] done.
[services.d] starting services
Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
[services.d] done.
2017/05/27 01:37:19 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:19 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:19 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:25 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:25 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:25 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:32 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:32 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:32 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:32 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:32 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:32 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:38 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:38 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:38 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:44 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:44 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:44 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:50 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:50 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:50 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:37:56 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:37:56 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:37:56 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:38:02 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:38:02 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:38:02 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data
2017/05/27 01:38:08 INFO : Google drive root '': Modify window is 1ms
2017/05/27 01:38:08 mount helper error: fusermount: user has no write access to mountpoint /data

2017/05/27 01:38:08 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Executing => rclone mount --config=/config/.rclone.conf --allow-other --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v Gdrive: /data

What is the problem ?!

I did setup my Google drive and setup the auth code with docker exec -it Rclone-mount rclone --config="/config/.rclone.conf" config

 

RCLONE_REMOTE_MOUNT:  Edit Remove
The destination that the data should be backed up to (must be the same name as specified in .rclone.conf. E.g. AmazonEncrypted:)

 

RCLONE_MOUNT_OPTIONS:  Edit Remove
Extra mount options that can be used, see: https://rclone.org/commands/rclone_mount/ . E.g.: --read-only --buffer-size=1G --max-read-ahead=200M --acd-templink-threshold=0 --dir-cache-time=60m --timeout=30s --contimeout=15s --retries=3 --low-level-retries=1 --stats=0 -v
RCLONE_CONFIG_PASS:  Edit Remove
The password for the .rclone.conf pass (if specified when creating the config file)

 

 

But nothing happen 

What i did wrong ?

 

 
Link to comment
22 hours ago, thomast_88 said:

@sniper Have you added the necessary Extra Parameters as writtin the the OP?
 

 If you mean this

--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared

 in extra parameters in advance then yes

 

Link to comment
Quote

2017/05/27 01:38:08 mount helper error: fusermount: user has no write access to mountpoint /data

 

@sniper Have you checked the permissions for your data folder?

 

From my post above:

 

Quote

When /mnt/disks/rclone_volume was created it was owned by root with 755 permissions. Quick chown/chmod fixed it but I was getting permission errors before that.

 

Edited by MTA99
Link to comment
@thomast_88 I Get this message 
sudo chown 911:911 /mnt/disks/rclone_volume/                                                
chown: changing ownership of '/mnt/disks/rclone_volume/': Read-only file system                           

 

 

Update:

I did mistake before 

I didn't  forget to edit this part 

--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared

 

Right now i do see my google folder via FTP 

But i can't see it from dockers

 

Edited by sniper
Link to comment
14 hours ago, sniper said:

@thomast_88 I Get this message 

sudo chown 911:911 /mnt/disks/rclone_volume/                                                
chown: changing ownership of '/mnt/disks/rclone_volume/': Read-only file system                           

 

 

Update:

I did mistake before 

I didn't  forget to edit this part 


--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared

 

Right now i do see my google folder via FTP 

But i can't see it from dockers

 

 

Read FAQ:

 

I cannot see my mounted volume/files outside of the container

  1. Make sure you have this in extra parameters (advanced view): --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared
  2. Make sure that this docker container is started before the container you are sharing the volume with.
Link to comment
9 hours ago, thomast_88 said:

 

Read FAQ:

 

I cannot see my mounted volume/files outside of the container

  1. Make sure you have this in extra parameters (advanced view): --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/:/data:shared
  2. Make sure that this docker container is started before the container you are sharing the volume with.

 

@thomast_88 I did read it 

right now i have it like this 

--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfine -v /mnt/disks/rclone_volume/Gdrive:/data:shared

I did stop other Containers and run it but still not showing up!

Edited by sniper
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.