chris31077 0 Posted November 26, 2021 Author Posted November 26, 2021 Thanks a lot I made it One last question.. I need to keep the terminal window with the rclone command open. Is there a chance to start it by booting the PI?
rodainas 191 Posted November 27, 2021 Posted November 27, 2021 52 minutes ago, chris31077 said: Thanks a lot I made it One last question.. I need to keep the terminal window with the rclone command open. Is there a chance to start it by booting the PI? What you want to do is set rclone as a service. Use this guide https://www.jamescoyle.net/how-to/3116-rclone-systemd-startup-mount-script
CassTG 113 Posted November 27, 2021 Posted November 27, 2021 (edited) I would also check the following out as it works perfectly for me and has been tweaked over the years, i.e VFScache is now the preferred option [Unit] Description=RClone Mount Service Wants=network-online.target After=network-online.target [Service] Type=notify KillMode=none ExecStart=/bin/rclone mount YOURRCLONEMOUNTNAME: /PATH/TO/YOUR/LOCAL/MOUNT/POINT \ --config /root/.config/rclone/rclone.conf \ --cache-dir=/vfscache/YOURMOUNTNAME \ --vfs-cache-max-size 80G \ --poll-interval 15s \ --log-level INFO \ --dir-cache-time 5000h \ --vfs-cache-mode writes \ --vfs-read-chunk-size 128M \ --vfs-cache-max-age 3h \ --vfs-cache-poll-interval 5m \ --allow-other \ --bwlimit 110M \ --no-checksum \ --no-modtime \ --drive-pacer-min-sleep 10ms StandardOutput=file:/rclonelogs/rclone_vfs_mount_flix2.log ExecStop=/bin/fusermount -uz /PATH/TO/YOUR/LOCAL/MOUNT/POINT Restart=on-failure [Install] WantedBy=default.target You can add any flags you needed in your previous messages here However Note the following Path Mounts /PATH/TO/YOUR/LOCAL/MOUNT/POINT This is the folder you created on your PI in which the Rclone Mount is Mounted, this is entered twice both at the top and in the unmount command at the bottom YOURRCLONEMOUNTNAME This is your Rclone Mount NAME VFS Cache Settings --vfs-cache-max-size 80G \ --vfs-cache-mode writes \ --vfs-read-chunk-size 128M \ Set Max size to whatever you like, obviously depends on how much storage space you have Cache Mode Writes means files you upload to gdrive will get cached this is useful in certain situations and for certain applications, it will cache them for the specified time or until the cache limit is hit. Don't use Full at first which is another option as that caches read and writes and if you scan say with Emby will cause the cache to fill up quick as the emby scan will pull down chunks of files and vfs will cache them all, after an initial scan is complete then you could switch this to full if you have good space Read Chunk Size is important, default is 128M anyway, And you can add a MAX flag as well however on initial scan i always found setting this to 8mb and max at 32mb meant i did not hit any google api bans, once scan complete you can set back to 128M or remove flag all together Bandwidth Limits --bwlimit 110M \ Set this to the maximum bandwidth you want to allow, this affects both uploads and Downloads. So if your net connection is say 200Mbps but you only want half avaliable for use set this to 12M (12*8 =96mbps) Api Limits --drive-pacer-min-sleep 10ms Depending on your api limits you may need to change this (Google recently updated the api limits (the old flag used to be called tpslimit) if you have the increased api limits then leave as set above see here for reasoning and how to check - Quotas per 100 Seconds Logging StandardOutput=file:/rclonelogs/rclone_vfs_mount_MOUNTNAME.log If you want logs of whats happening (info) then set the path here Avoiding Errors Systemd and failures whne starting services can be a royal pain in the backside so i do this before starting If using vfscache create the folder you stated in the --cache-dir first If using logging create the folder you stated in -standardOutput=file Then create the logfile itself - nano rclone_vfs_mount_MOUNTNAME.log ,then ctrl o and ctrl x to close and save If any of the folders already have files init you may get exit code 1 error so always best to use fresh folder, or add the allow non empty flag Then: systemctl start YOURSYSTEMDFILENAME.service If it starts without error then type: systemctl enable YOURSYSTEMDFILENAME.service And check if it's loaded with systemctl status YOURSYSTEMDFILENAME.service You can create one of these files for each mount you make just name it something different Edited November 27, 2021 by CassTG 1
chris31077 0 Posted December 13, 2021 Author Posted December 13, 2021 Hello, would you please advice me one more time? Everything works fine, but every week the token gehts expired and I would like to avoid it adding the new token every week. Is there a way to get this issue solved? Thanks
CassTG 113 Posted December 13, 2021 Posted December 13, 2021 (edited) 1 hour ago, chris31077 said: Hello, would you please advice me one more time? Everything works fine, but every week the token gehts expired and I would like to avoid it adding the new token every week. Is there a way to get this issue solved? Thanks This is standard practise, unless you submit the Google OAUTH "app" for approval it is in testing mode, you are unlikely to get approval most do not. That means you need to renew the token weekly. You could use Service Accounts i believe to get round this, but thats a whole world of pain. Edited December 13, 2021 by CassTG
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now