thomast_88 Posted April 29, 2017 Share Posted April 29, 2017 (edited) 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 February 9, 2019 by thomast_88 1 Quote Link to comment
thomast_88 Posted April 29, 2017 Author Share Posted April 29, 2017 (edited) 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: 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 Copy it to: "/mnt/cache/appdata/rclone-mount/config/" I cannot see my mounted volume/files outside of the container 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 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? See this post And this discussion on the official rclone forum 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 February 9, 2019 by thomast_88 Quote Link to comment
thomast_88 Posted April 29, 2017 Author Share Posted April 29, 2017 (edited) 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 April 29, 2017 by thomast_88 Quote Link to comment
RAINMAN Posted April 29, 2017 Share Posted April 29, 2017 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. Quote Link to comment
thomast_88 Posted April 30, 2017 Author Share Posted April 30, 2017 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. Quote Link to comment
MTA99 Posted May 1, 2017 Share Posted May 1, 2017 Having a play around with this and I think there's a typo in your template -submitted an issue on github Quote Link to comment
thomast_88 Posted May 1, 2017 Author Share Posted May 1, 2017 Good catch. I updated the template. Quote Link to comment
MTA99 Posted May 1, 2017 Share Posted May 1, 2017 (edited) 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 ) Edited May 1, 2017 by MTA99 Quote Link to comment
thomast_88 Posted May 1, 2017 Author Share Posted May 1, 2017 (edited) 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 ) 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. @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 May 1, 2017 by thomast_88 Quote Link to comment
MTA99 Posted May 1, 2017 Share Posted May 1, 2017 @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 Quote Link to comment
thomast_88 Posted May 1, 2017 Author Share Posted May 1, 2017 (edited) @MTA99 I see :-) But your point is good. The application can as well fail fast, as the rclone mount feature requires the colon to be there. Interesting. How many folder / files were in the directory you tried to list? Edited May 1, 2017 by thomast_88 Quote Link to comment
jude Posted May 1, 2017 Share Posted May 1, 2017 Having trouble getting your template to show up. I'm adding https://github.com/tynor88/docker-templates to the Docker repositories template section. After saving, I try to add a new container from the templates and yours don't show up. Not sure what I'm missing. Quote Link to comment
thomast_88 Posted May 1, 2017 Author Share Posted May 1, 2017 (edited) @jude Do you have Community Applications installed? If not, I suggest you use that. Just search rclone and it will pop up. EDIT: you should add https://github.com/tynor88/docker-templates/tree/master/tynor88 Edited May 1, 2017 by thomast_88 Quote Link to comment
jude Posted May 1, 2017 Share Posted May 1, 2017 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 Quote Link to comment
thomast_88 Posted May 1, 2017 Author Share Posted May 1, 2017 I don't have time to write a step-by-step guide today, but later some week I can do one. This thread (including the FAQ) should get you up and running pretty fast though. Any issues you are facing right now? Quote Link to comment
sniper Posted May 27, 2017 Share Posted May 27, 2017 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 ? Quote Link to comment
thomast_88 Posted May 27, 2017 Author Share Posted May 27, 2017 @sniper Have you added the necessary Extra Parameters as writtin the the OP? Quote Link to comment
sniper Posted May 28, 2017 Share Posted May 28, 2017 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 Quote Link to comment
MTA99 Posted May 29, 2017 Share Posted May 29, 2017 (edited) 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 May 29, 2017 by MTA99 Quote Link to comment
sniper Posted May 29, 2017 Share Posted May 29, 2017 @MTA99 No and i don't know how to change the permissions What should i do ? Quote Link to comment
thomast_88 Posted May 29, 2017 Author Share Posted May 29, 2017 (edited) @sniper sudo chown 911:911 /path/to/mount/folder I will fix this in the docker directly this week. Edited May 29, 2017 by thomast_88 Quote Link to comment
sniper Posted May 29, 2017 Share Posted May 29, 2017 (edited) @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 May 29, 2017 by sniper Quote Link to comment
thomast_88 Posted May 30, 2017 Author Share Posted May 30, 2017 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 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 Make sure that this docker container is started before the container you are sharing the volume with. Quote Link to comment
sniper Posted May 30, 2017 Share Posted May 30, 2017 (edited) 9 hours ago, thomast_88 said: Read FAQ: I cannot see my mounted volume/files outside of the container 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 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 May 30, 2017 by sniper Quote Link to comment
Recommended Posts
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.