Multiple mount unraid

What is the problem you are having with rclone?

I am an unraid newbie and am trying to mount remotes drives.
I found the mount scripts on a forum, but I'm not sure if they are correct.
With this script I can only mount the first remote, all the others are empty.
Can you help me understand if the script is correct and where am I wrong? Thank you

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.0

  • os/version: slackware 15.0 (64 bit)
  • os/kernel: 5.15.46-Unraid (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.18.3
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive Team Share

The command you were trying to run (eg rclone copy /tmp remote:tmp)

#!/bin/bash
#----------------------------------------------------------------------------
#first section makes the folders for the mount in the /mnt/disks folder so docker containers can have access
#there are 4 entries below as in the video i had 4 remotes amazon,dropbox, google and secure
#you only need as many as what you need to mount for dockers or a network share

mkdir -p /mnt/disks/media_gdrive
mkdir -p /mnt/disks/media_archivio_gdrive
mkdir -p /mnt/disks/ebook_gdrive
mkdir -p /mnt/disks/musica_gdrive

#This section mounts the various cloud storage into the folders that were created above.

rclone mount --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_gdrive: /mnt/disks/media_gdrive &
rclone mount --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_archivio_gdrive: /mnt/disks/media_archivio_gdrive &
rclone mount --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off ebook_gdrive: /mnt/disks/ebook_gdrive &
rclone mount --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off musica_gdrive: /mnt/disks/musica_gdrive &

The rclone config contents with secrets removed.

[media_gdrive]
type = drive
client_id = 610...
client_secret = GOC...
scope = drive
token = {"access_token":"ya2...}
team_drive = 0ANs...
root_folder_id = 

[media_archivio_gdrive]
type = drive
client_id = 610...
client_secret = GOC...
scope = drive
token = {"access_token":"ya2...}
team_drive = 0AD...
root_folder_id = 

[musica_gdrive]
type = drive
client_id = 610...
client_secret = GOC...
scope = drive
token = {"access_token":"ya2...}
team_drive = 0AF...
root_folder_id = 

[ebook_gdrive]
type = drive
client_id = 610...
client_secret = GOC...
scope = drive
token = {"access_token":"ya2...}
team_drive = 0AI...
root_folder_id = 

A log from the command with the -vv flag

Script Starting Jul 23, 2022 05:11.19

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount/log.txt

Script Finished Jul 23, 2022 05:11.19

Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_mount/log.txt

2022/07/23 05:11:19 INFO : Starting transaction limiter: max 8 transactions/s with burst 1
2022/07/23 05:11:19 NOTICE: Serving remote control on http://localhost:5572/
2022/07/23 05:11:19 INFO : Starting transaction limiter: max 8 transactions/s with burst 1
2022/07/23 05:11:19 Failed to start remote control: start server failed: listen tcp 127.0.0.1:5572: bind: address already in use
2022/07/23 05:11:19 INFO : Starting transaction limiter: max 8 transactions/s with burst 1
2022/07/23 05:11:19 Failed to start remote control: start server failed: listen tcp 127.0.0.1:5572: bind: address already in use
2022/07/23 05:11:19 INFO : Starting transaction limiter: max 8 transactions/s with burst 1
2022/07/23 05:11:19 Failed to start remote control: start server failed: listen tcp 127.0.0.1:5572: bind: address already in use

when using --rc, rclone, by default, uses port 5572.

each rclone mount commands needs a unique, unused port
https://rclone.org/rc/#rc-addr-ip

rclone mount --rc-addr=:6001 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_gdrive: /mnt/disks/media_gdrive &
rclone mount --rc-addr=:6002 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_archivio_gdrive: /mnt/disks/media

and then would need to specify the port in rc commands, for example,
rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:6001

Ok, so the script will become

#!/bin/bash

mkdir -p /mnt/disks/media_gdrive
mkdir -p /mnt/disks/media_archivio_gdrive
mkdir -p /mnt/disks/ebook_gdrive
mkdir -p /mnt/disks/musica_gdrive


rclone mount --rc-addr=:6001 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_gdrive: /mnt/disks/media_gdrive &
rclone mount --rc-addr=:6002 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media_archivio_gdrive: /mnt/disks/media
rclone mount --rc-addr=:6003 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off ebook_gdrive: /mnt/disks/ebook_gdrive &
rclone mount --rc-addr=:6004 --allow-other --dir-cache-time 96h --drive-chunk-size 32M --log-level INFO --timeout 1h --umask 002 --rc --tpslimit 8 --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off musica_gdrive: /mnt/disks/musica_gdrive &

rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:6001
rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:6002
rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:6003
rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:6004

and for unmount

#!/bin/bash
#----------------------------------------------------------------------------
fusermount -u /mnt/disks/media_gdrive
fusermount -u /mnt/disks/media_archivio_gdrive
fusermount -u /mnt/disks/musica_gdrive
fusermount -u /mnt/disks/ebook_gdrive

Are these the right parameters to mount google drives or do I need to change something?

well, it depends on that you plan to do with the mount?

3 will be used as a simple mirror copy of my nas
1 will be used on plex for the stream

And I will add an encrypted one for photo backup and personal files

i always start with the simplest command possible, get a baseline speed.
then add flags, test and tweak as needed.

as for rclone+gdrive+plex flags, i would mimic this
https://github.com/animosity22/homescripts/blob/master/systemd/rclone-drive.service

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