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


DZMM

Recommended Posts

17 minutes ago, francrouge said:

Hi so i manage to run the commands

 

In the logs everything look good.

 

But My concern is this.

 

I just want to be able to drag movies etc in my gdrive and then play it with plex.

 

So how does you're script works ?

 

Because ive been reading it and i don't quite understand  the union_fs part.

 

I can create my folder there but can i dump my files there ?

 

Because nothing is showing up in gdrive write now ?

 

thx  a lot

You can copy files directly to the mount, but it's better to use rclone move as it retries if there's an error. 

 

What unionfs does is create a merged folder for plex that combines local files + cloud files in one directory, so you don't get issues in plex like it thinking files are missing, getting confused when files have been upgraded etc.

 

If you are just copying completed files to rclone you should just modify the upload script i.e.:

 

rclone move /mnt/source_folder/ gdrive_media_vfs:destination_folder -vv --drive-chunk-size 512M --checkers 3 --fast-list --transfers 2 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~*  --delete-empty-src-dirs --fast-list --bwlimit 9500k --tpslimit 3 --min-age 30m

Edit: has your playback improved?

Edited by DZMM
Link to comment
17 minutes ago, DZMM said:

You can copy files directly to the mount, but it's better to use rclone move as it retries if there's an error. 

 

What unionfs does is create a merged folder for plex that combines local files + cloud files in one directory, so you don't get issues in plex like it thinking files are missing, getting confused when files have been upgraded etc.

 

If you are just copying completed files to rclone you should just modify the upload script i.e.:

 


rclone move /mnt/source_folder/ gdrive_media_vfs:destination_folder -vv --drive-chunk-size 512M --checkers 3 --fast-list --transfers 2 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~*  --delete-empty-src-dirs --fast-list --bwlimit 9500k --tpslimit 3 --min-age 30m

Edit: has your playback improved?

So if i understand you correctly i can just do the upload script and not the order if i want to move myself files ?

 

and I can't see nothing in gdrive is it normal ?

 

but i got some files in folders that were created

Link to comment
2 hours ago, francrouge said:

Hi so i manage to run the commands

 

In the logs everything look good.

 

But My concern is this.

 

I just want to be able to drag movies etc in my gdrive and then play it with plex.

 

So how does you're script works ?

 

Because ive been reading it and i don't quite understand  the union_fs part.

 

I can create my folder there but can i dump my files there ?

 

Because nothing is showing up in gdrive write now ?

 

thx  a lot

Hi again If i tried to do the mountcheck i got an encrypted file in gdrive but if i put a file directly via krusader i got nothing.

 

What should i do ?

 

thx

Link to comment
19 minutes ago, francrouge said:

Hi again If i tried to do the mountcheck i got an encrypted file in gdrive but if i put a file directly via krusader i got nothing.

 

What should i do ?

 

thx

use the commands via ssh to create the mountcheck file and to transfer it's foolproof.  

 

If you're not seeing your other files then something's gone wrong with your encryption - are you sure the new vfs mount is using the same keys as your old encrypted mount?

Link to comment
2 hours ago, DZMM said:

use the commands via ssh to create the mountcheck file and to transfer it's foolproof.  

 

If you're not seeing your other files then something's gone wrong with your encryption - are you sure the new vfs mount is using the same keys as your old encrypted mount?

Hi I tried to do the mountcheck and now i'm getting this.

 

 rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse
2018/12/19 10:47:54 DEBUG : rclone: Version "v1.45-035-g9cb3a68c-beta" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone-beta/.rclone.conf" "copy" "mountcheck" "gdrive_media_vfs:" "-vv" "--no-traverse"]
2018/12/19 10:47:54 DEBUG : Using config file from "/boot/config/plugins/rclone-beta/.rclone.conf"
2018/12/19 10:47:54 DEBUG : pacer: Rate limited, sleeping for 1.44768391s (1 consecutive low level retries)
2018/12/19 10:47:54 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2018/12/19 10:47:55 DEBUG : pacer: Rate limited, sleeping for 2.483050266s (2 consecutive low level retries)
2018/12/19 10:47:55 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2018/12/19 10:47:56 DEBUG : pacer: Resetting sleep to minimum 10ms on success
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 1/3 failed with 1 errors
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 2/3 failed with 1 errors
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 3/3 failed with 1 errors

I did create an api code etc.

 

And now its this error

 

rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse
2018/12/19 12:46:52 DEBUG : rclone: Version "v1.45-035-g9cb3a68c-beta" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone-beta/.rclone.conf" "copy" "mountcheck" "gdrive_media_vfs:" "-vv" "--no-traverse"]
2018/12/19 12:46:52 DEBUG : Using config file from "/boot/config/plugins/rclone-beta/.rclone.conf"
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 1/3 failed with 1 errors
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 2/3 failed with 1 errors
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 3/3 failed with 1 errors
2018/12/19 12:46:53 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 0 / 0, -
Transferred:            0 / 0, -
Elapsed time:          1s

 

Edited by francrouge
Link to comment
2 hours ago, francrouge said:

Hi I tried to do the mountcheck and now i'm getting this.

 


 rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse
2018/12/19 10:47:54 DEBUG : rclone: Version "v1.45-035-g9cb3a68c-beta" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone-beta/.rclone.conf" "copy" "mountcheck" "gdrive_media_vfs:" "-vv" "--no-traverse"]
2018/12/19 10:47:54 DEBUG : Using config file from "/boot/config/plugins/rclone-beta/.rclone.conf"
2018/12/19 10:47:54 DEBUG : pacer: Rate limited, sleeping for 1.44768391s (1 consecutive low level retries)
2018/12/19 10:47:54 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2018/12/19 10:47:55 DEBUG : pacer: Rate limited, sleeping for 2.483050266s (2 consecutive low level retries)
2018/12/19 10:47:55 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2018/12/19 10:47:56 DEBUG : pacer: Resetting sleep to minimum 10ms on success
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 1/3 failed with 1 errors
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 2/3 failed with 1 errors
2018/12/19 10:47:59 ERROR : : error reading source directory: directory not found
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 10:47:59 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 10:47:59 ERROR : Attempt 3/3 failed with 1 errors

I did create an api code etc.

 

And now its this error

 


rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse
2018/12/19 12:46:52 DEBUG : rclone: Version "v1.45-035-g9cb3a68c-beta" starting with parameters ["rcloneorig" "--config" "/boot/config/plugins/rclone-beta/.rclone.conf" "copy" "mountcheck" "gdrive_media_vfs:" "-vv" "--no-traverse"]
2018/12/19 12:46:52 DEBUG : Using config file from "/boot/config/plugins/rclone-beta/.rclone.conf"
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 1/3 failed with 1 errors
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 2/3 failed with 1 errors
2018/12/19 12:46:53 ERROR : : error reading source directory: directory not found
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for checks to finish
2018/12/19 12:46:53 INFO  : Encrypted drive 'gdrive_media_vfs:': Waiting for transfers to finish
2018/12/19 12:46:53 ERROR : Attempt 3/3 failed with 1 errors
2018/12/19 12:46:53 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 0 / 0, -
Transferred:            0 / 0, -
Elapsed time:          1s

 

Okay  so good news i managed to fix the upload issue

 

I'm able to upload files with the uploader script but i can't see nothing in the mount_rclone and union fs is it normal ?

 

Because in the first page it say to map plex to union  i think.

 

 

thx

Link to comment

@DZMM

 

Is your cleanup script STILL working? Using mostly your settings.

 

unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RO:/mnt/user/Archiv=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs
 

 


find /mnt/user/mount_unionfs/google_vfs/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/user/mount_unionfs/google_vfs/.unionfs}
newPath=/mnt/user/mount_rclone/google_vfs${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/user/mount_unionfs/google_vfs/.unionfs" -mindepth 1 -type d -empty -delete

 

I also changed my upload script to this:


rclone move /mnt/user/Archiv/Filme gdrive_media_vfs:Filme -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y && rclone move /mnt/user/Archiv/Serien gdrive_media_vfs:Serien -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y

 

But i want to add /Musik later.

 

 

Also what to do when i have some ghost files which cant be deleted? (its one file actually) Its one the local drive somewhere, but not in the cloud (no problems so far, but cleanup script is throwing erros bc of this)

 

20.12.2018 08:28:16 INFO: starting unionfs cleanup.
rm: cannot remove '/mnt/user/mount_rclone/google_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/Filme/1922 (2017)/1922 (2017).mkv': No such file or directory
rm: cannot remove '/mnt/user/mount_unionfs/google_vfs/.unionfs/Filme/1922 (2017)/1922 (2017).mkv_HIDDEN~': Permission denied
Script Finished Thu, 20 Dec 2018 08:28:17 +0100

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

unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RO:/mnt/user/Archiv=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs
 

 


find /mnt/user/mount_unionfs/google_vfs/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/user/mount_unionfs/google_vfs/.unionfs}
newPath=/mnt/user/mount_rclone/google_vfs${oldPath%_HIDDEN~}
rm "$newPath"
rm "$line"
done
find "/mnt/user/mount_unionfs/google_vfs/.unionfs" -mindepth 1 -type d -empty -delete

It won't work for you as you've added a 2nd RO directory.  You need:

 

find /mnt/user/mount_unionfs/google_vfs/.unionfs -name '*_HIDDEN~' | while read line; do
oldPath=${line#/mnt/user/mount_unionfs/google_vfs/.unionfs}
newPath=/mnt/user/mount_rclone/google_vfs${oldPath%_HIDDEN~}
newPath1=/mnt/user/rclone_upload/google_vfs${oldPath%_HIDDEN~}
rm "$newPath"
rm "$newPath1"
rm "$line"
done
find "/mnt/user/mount_unionfs/google_vfs/.unionfs" -mindepth 1 -type d -empty -delete

 

1 hour ago, nuhll said:

rclone move /mnt/user/Archiv/Filme gdrive_media_vfs:Filme -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y && rclone move /mnt/user/Archiv/Serien gdrive_media_vfs:Serien -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y

 

But i want to add /Musik later.

Just add another move:

 

rclone move /mnt/user/Archiv/Musik gdrive_media_vfs:Musik -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y && rclone move /mnt/user/Archiv/Serien gdrive_media_vfs:Serien -vv --drive-chunk-size 128M --checkers 1 --fast-list --transfers 4 --exclude .unionfs/** --exclude *fuse_hidden* --exclude *_HIDDEN --exclude .recycle** --exclude *.backup~* --exclude *.partial~* --delete-empty-src-dirs --fast-list --tpslimit 3 --min-age 8y

I haven't uploaded music and I'm not sure if that's a good idea as even an extra pause of a second between tracks would be annoying.  Let me know what the experience is like as I'm curious.

 

1 hour ago, nuhll said:

20.12.2018 08:28:16 INFO: starting unionfs cleanup.
rm: cannot remove '/mnt/user/mount_rclone/google_vfs/mnt/user/mount_unionfs/google_vfs/.unionfs/Filme/1922 (2017)/1922 (2017).mkv': No such file or directory
rm: cannot remove '/mnt/user/mount_unionfs/google_vfs/.unionfs/Filme/1922 (2017)/1922 (2017).mkv_HIDDEN~': Permission denied
Script Finished Thu, 20 Dec 2018 08:28:17 +0100

There's something odd about the file permissions - just delete manually via terminal

Link to comment
mount union is the combination of your local and remote files, if it dont show anything, its not working.
 
important is that you run the mount via background, not via "RUN SCRIPT".
Ok thx for the infos

So if i understand you correctly for unionfs.

I should see local shares folder and google drive.

Or local files that i put and google drive ?

Sorry for all those questions i'm new to this.

Thx

Envoyé de mon Pixel 2 XL en utilisant Tapatalk

Link to comment

@Kaizac how are you getting on with your td-->td transfers?  I'm still nervous about doing them e.g. I just moved a two movie folders between td1/adults/  td1/kids using putty and the folders moved ok, but the file inside disappeared!  I just did moved an individual file using putty and that went ok.

 

I think I'm going to stick with consolidating all my files to gdrive once they've uploaded and doing my moves/edits there.  The lesson here is make sure everything is organised correctly before uploading.

 

Edit:  Looks like it was a false alarm.  Not sure what how, but the file was also in td2/adults - the file in td1/adults must have been a phantom or something....I just did the same transfer from td2/adults to td2/kids and all was ok - phew!

Edited by DZMM
Link to comment
19 minutes ago, francrouge said:

Ok thx for the infos

So if i understand you correctly for unionfs.

I should see local shares folder and google drive.

Or local files that i put and google drive ?

Sorry for all those questions i'm new to this.

Thx

Envoyé de mon Pixel 2 XL en utilisant Tapatalk
 

Unionfs is useful is if you want to add one monitored folder for sonarr & radarr that combines files that are on your local drive with files that have already been uploaded e.g. if you had tv_show1 spread across /mnt/user/rclone_upload/google_vfs/tv_shows/tv_show1 and /mnt/user/mount_rclone/google_vfs/tv_shows/tv_show1 sonarr can only monitor one folder at a time, so if when files are moved to the cloud it would think they are missing and download them again, meaning you could end up with multiple copies on the cloud.  Also, sonarr wouldn't be able to upgrade files.  For radarr, the problems are similar.

 

Even if you're not using radarr or sonarr and you are just using Plex, it's cleaner to add the unionfs folder to Plex rather than both the upload and cloud folder, because plex won't waste time re-scanning files when it spots they've moved to the cloud, as to plex they won't have moved as the unionfs folder 'masks' the real location

Link to comment
Unionfs is useful is if you want to add one monitored folder for sonarr & radarr that combines files that are on your local drive with files that have already been uploaded e.g. if you had tv_show1 spread across /mnt/user/rclone_upload/google_vfs/tv_shows/tv_show1 and /mnt/user/mount_rclone/google_vfs/tv_shows/tv_show1 sonarr can only monitor one folder at a time, so if when files are moved to the cloud it would think they are missing and download them again, meaning you could end up with multiple copies on the cloud.  Also, sonarr wouldn't be able to upgrade files.  For radarr, the problems are similar.
 
Even if you're not using radarr or sonarr and you are just using Plex, it's cleaner to add the unionfs folder to Plex rather than both the upload and cloud folder, because plex won't waste time re-scanning files when it spots they've moved to the cloud, as to plex they won't have moved as the unionfs folder 'masks' the real location
Thx for infos

So can you tell if i,m juste able to upload.

I can,t see nothing in union folder and rclone mount.

What should i check first ?

Thx again

Envoyé de mon Pixel 2 XL en utilisant Tapatalk

Link to comment
4 minutes ago, francrouge said:

Thx for infos

So can you tell if i,m juste able to upload.

I can,t see nothing in union folder and rclone mount.

What should i check first ?

Thx again

Envoyé de mon Pixel 2 XL en utilisant Tapatalk
 

post your rclone config (remove passwords and IDs) and mount script

Link to comment
5 minutes ago, Spladge said:

I followed the instructions in the rclone beta thread and can't stream for very long without having to restart so have tried to move to this method today (but unencrypted). Do I need to do something to get rid of the mount created in the rclone beta instructions?

no - just substitute in your existing remote name in the mount script for my gdrive_media_vfs remote.  Or, rename the remote in rclone config might be easier

Link to comment
2 minutes ago, DZMM said:

post your rclone config (remove passwords and IDs) and mount script

Mount

 

#!/bin/bash

#######  Check if script is already running  ##########

if [[ -f "/mnt/user/appdata/other/rclone/rclone_mount_running" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Exiting script already running."

exit

else

touch /mnt/user/appdata/other/rclone/rclone_mount_running

fi

#######  End Check if script already running  ##########

#######  Start rclone mounts  ##########

# create directories for rclone mount and unionfs mount

mkdir -p /mnt/user/appdata/other/rclone
mkdir -p /mnt/user/mount_rclone/google_vfs
mkdir -p /mnt/user/mount_unionfs/google_vfs
mkdir -p /mnt/user/rclone_upload/google_vfs

#######  Start rclone gdrive mount  ##########

# check if gdrive mount already created

if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check rclone vfs already mounted."

else

echo "$(date "+%d.%m.%Y %T") INFO: mounting rclone vfs."

rclone mount --allow-other --buffer-size 512M --dir-cache-time 72h --drive-chunk-size 512M --fast-list --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off gdrive_media_vfs: /mnt/user/mount_rclone/google_vfs &

# check if mount successful

# slight pause to give mount time to finalise

sleep 5

if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check rclone gdrive vfs mount success."

else

echo "$(date "+%d.%m.%Y %T") CRITICAL: rclone gdrive vfs mount failed - please check for problems."

rm /mnt/user/appdata/other/rclone/rclone_mount_running

exit

fi

fi

#######  End rclone gdrive mount  ##########

#######  Start unionfs mount   ##########

if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs already mounted."

else



# uncomment the unionfs mount below if not using teamdrive and delete the one above

 unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs

if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs mounted."

else

echo "$(date "+%d.%m.%Y %T") CRITICAL: unionfs Remount failed."

rm /mnt/user/appdata/other/rclone/rclone_mount_running

exit

fi

fi

#######  End Mount unionfs   ##########

############### starting dockers that need unionfs mount ######################

# only start dockers once

if [[ -f "/mnt/user/appdata/other/rclone/dockers_started" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: dockers already started"

else

touch /mnt/user/appdata/other/rclone/dockers_started

echo "$(date "+%d.%m.%Y %T") INFO: Starting dockers."


docker start tautulli
docker start PlexMediaServer

fi

############### end dockers that need unionfs mount ######################

# populate rclone dir-cache 

# only populate dir cache once

if [[ -f "/mnt/user/appdata/other/rclone/dir_cache_populated" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: dir cache already populated"

else

touch /mnt/user/appdata/other/rclone/dir_cache_populated

echo "$(date "+%d.%m.%Y %T") Info: populating dir cache - this could take a while."

rclone rc --timeout=1h vfs/refresh recursive=true

echo "$(date "+%d.%m.%Y %T") Info: populating dir cache complete."

fi

exit

 

 

Config

 

[gdrive]
type = drive
scope = drive
token = 
client_id = 
client_secret = 

[gdrive_media_vfs]
type = crypt
remote = gdrive:crypt
filename_encryption = standard
directory_name_encryption = true
password = 
password2 = 

thx

Link to comment
4 minutes ago, francrouge said:

Mount

 


#!/bin/bash

#######  Check if script is already running  ##########

if [[ -f "/mnt/user/appdata/other/rclone/rclone_mount_running" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Exiting script already running."

exit

else

touch /mnt/user/appdata/other/rclone/rclone_mount_running

fi

#######  End Check if script already running  ##########

#######  Start rclone mounts  ##########

# create directories for rclone mount and unionfs mount

mkdir -p /mnt/user/appdata/other/rclone
mkdir -p /mnt/user/mount_rclone/google_vfs
mkdir -p /mnt/user/mount_unionfs/google_vfs
mkdir -p /mnt/user/rclone_upload/google_vfs

#######  Start rclone gdrive mount  ##########

# check if gdrive mount already created

if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check rclone vfs already mounted."

else

echo "$(date "+%d.%m.%Y %T") INFO: mounting rclone vfs."

rclone mount --allow-other --buffer-size 512M --dir-cache-time 72h --drive-chunk-size 512M --fast-list --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off gdrive_media_vfs: /mnt/user/mount_rclone/google_vfs &

# check if mount successful

# slight pause to give mount time to finalise

sleep 5

if [[ -f "/mnt/user/mount_rclone/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check rclone gdrive vfs mount success."

else

echo "$(date "+%d.%m.%Y %T") CRITICAL: rclone gdrive vfs mount failed - please check for problems."

rm /mnt/user/appdata/other/rclone/rclone_mount_running

exit

fi

fi

#######  End rclone gdrive mount  ##########

#######  Start unionfs mount   ##########

if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs already mounted."

else



# uncomment the unionfs mount below if not using teamdrive and delete the one above

 unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs

if [[ -f "/mnt/user/mount_unionfs/google_vfs/mountcheck" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: Check successful, unionfs mounted."

else

echo "$(date "+%d.%m.%Y %T") CRITICAL: unionfs Remount failed."

rm /mnt/user/appdata/other/rclone/rclone_mount_running

exit

fi

fi

#######  End Mount unionfs   ##########

############### starting dockers that need unionfs mount ######################

# only start dockers once

if [[ -f "/mnt/user/appdata/other/rclone/dockers_started" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: dockers already started"

else

touch /mnt/user/appdata/other/rclone/dockers_started

echo "$(date "+%d.%m.%Y %T") INFO: Starting dockers."


docker start tautulli
docker start PlexMediaServer

fi

############### end dockers that need unionfs mount ######################

# populate rclone dir-cache 

# only populate dir cache once

if [[ -f "/mnt/user/appdata/other/rclone/dir_cache_populated" ]]; then

echo "$(date "+%d.%m.%Y %T") INFO: dir cache already populated"

else

touch /mnt/user/appdata/other/rclone/dir_cache_populated

echo "$(date "+%d.%m.%Y %T") Info: populating dir cache - this could take a while."

rclone rc --timeout=1h vfs/refresh recursive=true

echo "$(date "+%d.%m.%Y %T") Info: populating dir cache complete."

fi

exit

 

 

Config

 


[gdrive]
type = drive
scope = drive
token = 
client_id = 
client_secret = 

[gdrive_media_vfs]
type = crypt
remote = gdrive:crypt
filename_encryption = standard
directory_name_encryption = true
password = 
password2 = 

thx

Hmm.  everything looks correct.  Apologies if these questions seem obvious:

 

1. Are you definitely using the right password and password2?

2. the files that are already in gdrive are encrypted (goobledegook when you look in google)?

3. Are the google files in a folder called crypt on google i.e. not encrypted so you can see my drive/crypt when you look at Google?

Link to comment
11 minutes ago, DZMM said:

Hmm.  everything looks correct.  Apologies if these questions seem obvious:

 

1. Are you definitely using the right password and password2?

2. the files that are already in gdrive are encrypted (goobledegook when you look in google)?

3. Are the google files in a folder called crypt on google i.e. not encrypted so you can see my drive/crypt when you look at Google?

It's ok lol maybe i made an error somewhere.

 

1. Password is ok just tested

2. the mouncheck file is encrypted so i suppose its working.

3.yes i can see it 

 

Check my picture just in case.

Capture.thumb.PNG.87833ce0a1401eec00e4ed83cf94f428.PNG

Capture1.PNG.4448bc7dbb96ab127ed2616ca237eebd.PNG

 

Inside mountcheck it should look like this ?

 

 

touch mountcheck


rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse

thx

 

Edited by francrouge
Link to comment
6 minutes ago, nuhll said:

Is the mount script correct starting without errors?

 

@DZMM

I just mean, do i need to change your cleanupscript because im using more folders?

seem ok in logs

 

It's telling me script is already running

 

 

But for upload part it seem to be not working.

 

 

 

/tmp/user.scripts/tmpScripts/upload/script: line 4: $'\357\273\277': command not found
/tmp/user.scripts/tmpScripts/upload/script: line 26: $'\357\273\277': command not found
20.12.2018 05:40:46 INFO: rclone not installed - will try again later.
Script Finished Thu, 20 Dec 2018 05:40:46 -0500

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

I already tried to reinstalled the normal version and the beta.

 

What version should i stick too ?

 

thx

Edited by francrouge
Link to comment
8 minutes ago, francrouge said:

It's ok lol maybe i made an error somewhere.

 

1. Password is ok just tested

2. the mouncheck file is encrypted so i suppose its working.

3.yes i can see it 

 

Check my picture just in case.

Capture.thumb.PNG.87833ce0a1401eec00e4ed83cf94f428.PNG

Capture1.PNG.4448bc7dbb96ab127ed2616ca237eebd.PNG

 

Inside mountcheck it should look like this ?

 

 


touch mountcheck


rclone copy mountcheck gdrive_media_vfs: -vv --no-traverse

thx

 

1. there's nothing in your crypt except your mountcheck file.....

2. you shouldn't be seein the mountcheck file in rclone_upload/google_vfs though as it's already in the cloud.  What does your /mnt/user/mount_rclone/google_vfs look like?

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.