Skip to content

Instantly share code, notes, and snippets.

@gmag11
Last active March 27, 2024 04:01
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save gmag11/dc139ffd6a8ca8b622e98ca6422f8d79 to your computer and use it in GitHub Desktop.
Save gmag11/dc139ffd6a8ca8b622e98ca6422f8d79 to your computer and use it in GitHub Desktop.
Mount multiple RClone remotes on boot with a single SystemD forking service definition
# Rclone mount on boot
# Copy file to: /etc/systemd/system
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount@<rclone-remote>.service
# To mount use:
# systemctl start rclone-mount@<rclone-remote>.service
# To disable mount on boot use:
# systemctl disable rclone-mount@<rclone-remote>.service
[Unit]
Description=rclone FUSE mount for %i
Documentation=http://rclone.org/docs/
After=network-online.target # externo.mount # This is only needed if you use an external USB hard drive in order to wait for it to be mounted
# Mount point in my system is on a USB drive, don't ask why :))), that's why I have to wait for it to get mounted
Requires=externo.mount
[Service]
#Type=forking
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
User=rclone
Group=rclone
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# --vfs-cache-mode full activates cache for writting and reading. Check RClone documentation
ExecStart=/usr/bin/rclone mount %i: /cloud/%i --vfs-cache-mode full -v --allow-other
ExecStop=/bin/fusermount -uz /cloud/%i
[Install]
#Wants=network-online.target
#Alias=rclone-rs
#RequiredBy=
WantedBy=multi-user.target
@gmag11
Copy link
Author

gmag11 commented Jun 7, 2019

Con el parámetro --vfs-cache-mode full que va en la llamada a rclone se comporta muchísimo más estable. Cuando escribes un fichero primero lo sube a la caché y después a la nube, pero durante el proceso el archivo estará bloqueado.

Hay que tener paciencia. No sirve para usarlo como almacenamiento normal pero es muy cómodo para enviar archivos en bloque
--allow-other permite acceder al almacenamiento al resto de usuarios, incluido www-data para usarlo, por ejemplo, con NextCloud.

@esturniolo
Copy link

Hola. Encontré tu comentario googleando.
Te ha dado problemas realizar mas de un mountpoint con rclone? Cuántos has llegado a montar en un mismo sistema?
Mi idea es hacerlo con 4 o 5 para que accedan diferentes usuarios por Nextcloud.
Un usuario = un mountpoint de rclone.

@gmag11
Copy link
Author

gmag11 commented Nov 29, 2019

Tengo más de diez nobes montadas. Cada punto de motaje puede tener usuario diferente. Lo importante es que el punto de montaje se llame igual que la entrada en rclone

@esturniolo
Copy link

Muchas gracias!

@adriaurora
Copy link

¡Muchas gracias por estas líneas!

@mytvpro
Copy link

mytvpro commented Apr 21, 2020

hi i seem to be misundestanding something. i have multiple remotes mounted in different places. this will only work if they are mount in same dir? should i create a separate service file for each dir then? i have multiple mounts in one dir, one mount in another, and another mount in another. should i create 3 services?

@mytvpro
Copy link

mytvpro commented Apr 21, 2020

sometimes my mount fails. where df no longer shows the mount point. then i re-mount it and its fine. not sure why this happens. can anything be done in service file to correct a failed mount? or should i perhaps edit the service to unmount before it mounts and then reload the service once a day or something as preventive measure?

---edit perhaps this is from me using & instead of nohup or even --daemon i will stray the latter first

@mytvpro
Copy link

mytvpro commented Apr 21, 2020

is there advantage to Type = forking? why is the line commented?
from rclone.org:

systemd When running rclone mount as a systemd service, it is possible to use Type=notify. In this case the service will enter the started state after the mountpoint has been successfully set up. Units having the rclone mount service specified as a requirement will see all files and folders immediately in this mode.

should Type = notify be used?

@gmag11
Copy link
Author

gmag11 commented Apr 25, 2020

hi i seem to be misundestanding something. i have multiple remotes mounted in different places. this will only work if they are mount in same dir? should i create a separate service file for each dir then? i have multiple mounts in one dir, one mount in another, and another mount in another. should i create 3 services?

I have every mount inside /cloud/ directory. You have to create folder first. For instance, if you like to mount Google Drive you can follow these steps, after copying service file onto /lib/systemd/system/:

  1. Create a folder on /cloud/. For instance GDrive_user
  2. Create a rclone configuration named the same. GDrive_user
  3. Use systemctl to start mount: sudo systemctl enable rclone-mount@GDrive_user`
  4. Check mount status with: sudo service rclone-mount@GDrive_user status`
  5. You should be able to list files with ls /cloud/GDrive_user
  6. You can enable mount with: sudo service rclone-mount@GDrive_user startand stop it withsudo service rclone-mount@GDrive_user stop

Notice that I'm using a user called rclone. You can change it with yours here

@gmag11
Copy link
Author

gmag11 commented Apr 25, 2020

is there advantage to Type = forking? why is the line commented?
from rclone.org:

systemd When running rclone mount as a systemd service, it is possible to use Type=notify. In this case the service will enter the started state after the mountpoint has been successfully set up. Units having the rclone mount service specified as a requirement will see all files and folders immediately in this mode.

should Type = notify be used?

I did not notice that, thank you. Please share your findings about that here and propose an edit if you like

@bmaehr
Copy link

bmaehr commented Apr 26, 2020

aptitude install rclone fuse

# Rclone mount on boot
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount@<rclone-remote>.service
# To mount use:
# systemctl start rclone-mount@<rclone-remote>.service
# To disable mount on boot use:
# systemctl disable rclone-mount@<rclone-remote>.service


[Unit]
Description=rclone fuse mount for %i
Documentation=https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79
AssertPathIsDirectory=/mnt/%i
After=network-online.target

[Service]
# Type=forking
# User=rclone
# Group=rclone
ExecStart=/usr/bin/rclone mount %i: /mnt/%i --vfs-cache-mode full -v --allow-other 
ExecStop=/bin/fusermount -uz /mnt/%i
# --vfs-cache-mode full activates cache for writting and reading. Check RClone documentation

[Install]
#Wants=network-online.target
#Alias=rclone-rs
#RequiredBy=
WantedBy=multi-user.target

@Zarrapo
Copy link

Zarrapo commented Oct 26, 2021

¿Cual es la razon por la que se usa /lib/systemd/system en lugar de /etc/systemd/system para el servicio?

@Zarrapo
Copy link

Zarrapo commented Oct 26, 2021

Como a mi me ha costado entenderlo, he procurado facilitar el camino a otros neofitos como yo en el systemd

# Service: rclone-mount@.service

# Documentation:
# https://rclone.org/docs/
# https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79

# Rclone mount on boot
# Copy file to: /lib/systemd/system/rclone-mount@.service

# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /mnt folder as origin to mount all remotes
# 	Example rclone.conf
#	[onedrive-principal]
#	type = onedrive
#	token = {"access_token":"TrCQA8B ...  E$","expiry":"2026-10-27T17:08:31.897968077+02:00"}
#	drive_id = 1dd31928XXXXXXXX
#	drive_type = personal
#	[onedrive-secundario]
#	type = onedrive
#	token = {"access_token":"TrCQA8B ...  E$","expiry":"2026-10-27T17:08:31.897968077+02:00"}
#	drive_id = 6731928XXXXXXXX
#	drive_type = personal

# 	Example folders
#	/mnt/onedrive-principal
#	/mnt/onedrive-secundario

# Register new service by typing:
# 	$ sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# 	$ sudo systemctl enable rclone-mount@<rclone-remote>.service
# 	$ sudo systemctl start rclone-mount@<rclone-remote>.service
# Do the next one for test
#	$ sudo systemctl status rclone-mount@<rclone-remote>.service

# Usage:
# To unmount drive use
# 	$ sudo systemctl stop rclone-mount@<rclone-remote>.service
# To mount use:
# 	$ sudo systemctl start rclone-mount@<rclone-remote>.service
# To disable mount on boot use:
# 	$ systemctl disable rclone-mount@<rclone-remote>.service
# To do Test
# 	$ rclone mount <rclone-remote>: /mnt/<rclone-remote> --vfs-cache-mode full -v --allow-other --daemon
#	$ ls /mnt/<rclone-remote>
#	$ fusermount -u /mnt/<rclone-remote>

# Nota: El parametro %i se cargara con el valor <rclone-remote>.service en la llamada de systemctl

[Unit]
Description=rclone fuse mount for %i
Documentation=https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79
AssertPathIsDirectory=/mnt/%i
After=network.target network-online.target

[Service]
User=german # Es que me llamo German tambien ;), no es coba
Group=german
Restart=on-failure
ExecStart=/usr/bin/rclone mount %i: /mnt/%i --vfs-cache-mode full -v --allow-other --no-modtime
ExecStop=/bin/fusermount -uz /mnt/%i

[Install]
WantedBy=multi-user.target

@gmag11
Copy link
Author

gmag11 commented Nov 22, 2021

Como a mi me ha costado entenderlo, he procurado facilitar el camino a otros neofitos como yo en el systemd

# Service: rclone-mount@.service

# Documentation:
# https://rclone.org/docs/
# https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79

# Rclone mount on boot
# Copy file to: /lib/systemd/system/rclone-mount@.service

# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /mnt folder as origin to mount all remotes
# 	Example rclone.conf
#	[onedrive-principal]
#	type = onedrive
#	token = {"access_token":"TrCQA8B ...  E$","expiry":"2026-10-27T17:08:31.897968077+02:00"}
#	drive_id = 1dd31928XXXXXXXX
#	drive_type = personal
#	[onedrive-secundario]
#	type = onedrive
#	token = {"access_token":"TrCQA8B ...  E$","expiry":"2026-10-27T17:08:31.897968077+02:00"}
#	drive_id = 6731928XXXXXXXX
#	drive_type = personal

# 	Example folders
#	/mnt/onedrive-principal
#	/mnt/onedrive-secundario

# Register new service by typing:
# 	$ sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# 	$ sudo systemctl enable rclone-mount@<rclone-remote>.service
# 	$ sudo systemctl start rclone-mount@<rclone-remote>.service
# Do the next one for test
#	$ sudo systemctl status rclone-mount@<rclone-remote>.service

# Usage:
# To unmount drive use
# 	$ sudo systemctl stop rclone-mount@<rclone-remote>.service
# To mount use:
# 	$ sudo systemctl start rclone-mount@<rclone-remote>.service
# To disable mount on boot use:
# 	$ systemctl disable rclone-mount@<rclone-remote>.service
# To do Test
# 	$ rclone mount <rclone-remote>: /mnt/<rclone-remote> --vfs-cache-mode full -v --allow-other --daemon
#	$ ls /mnt/<rclone-remote>
#	$ fusermount -u /mnt/<rclone-remote>

# Nota: El parametro %i se cargara con el valor <rclone-remote>.service en la llamada de systemctl

[Unit]
Description=rclone fuse mount for %i
Documentation=https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79
AssertPathIsDirectory=/mnt/%i
After=network.target network-online.target

[Service]
User=german # Es que me llamo German tambien ;), no es coba
Group=german
Restart=on-failure
ExecStart=/usr/bin/rclone mount %i: /mnt/%i --vfs-cache-mode full -v --allow-other --no-modtime
ExecStop=/bin/fusermount -uz /mnt/%i

[Install]
WantedBy=multi-user.target

Genial. Muchas gracias! Tocayo

@gmag11
Copy link
Author

gmag11 commented Nov 22, 2021

¿Cual es la razon por la que se usa /lib/systemd/system en lugar de /etc/systemd/system para el servicio?

Seguramente es igual. Quizá incluso sea más correcto usar /etc

@juandpineiro
Copy link

juandpineiro commented Jan 20, 2022

Muchisimas gracias por el script. Soy bastante nuevo en esto de los servicios SystemD. Lo único que cambié fue la ubicación del script en /etc/systemd/ en lugar de /lib/systemd/ ya que estoy usando Fedora Silverblue y /lib es parte del sistema inmutable.

EDIT: ah y por supuesto también comenté el requerimiento del montaje del disco externo, que no es mi caso.

@gmag11
Copy link
Author

gmag11 commented Jan 22, 2022

Gracias a tí @juandpineiro. Realmente es más correcto usar /etc/systemd. Lo actualizo.

@moha20051985
Copy link

moha20051985 commented Nov 1, 2022

Gracias por el manual, pero soy un poco novato en todo esto.

Quiero realizar el tutorial para 3 montajes, pero no se cuales tienen que ser lo nombres correctos de los archivos.
Pongamos el ejemplo que mis montajes se llaman en Rclone, PEPITO, JUANITO y FULANITO.
Tendría que tener 3 archivos en /etc/systemd/system llamados;
rclone-mount@PEPITO.service
rclone-mount@JUANITO.service
rclone-mount@FULANITO.service

o seria ( quitando el espacio );
rclone-mount@< PEPITO>.service
rclone-mount@< JUANITO>.service
rclone-mount@< FULANITO>.service

Perdón por estas preguntas que quizás sean de novato, pero no consigo montar las 3 a la vez ;(

Saludo y gracias

@juandpineiro
Copy link

@moha20051985 ninguna pregunta es tonta y me parece buena idea ir por lo seguro sobretodo con este tipo de información.

Me tomo la libertad de responderte sin esperar al OP porque esto me ha sido enormemente útil y lo utilizo todos los días en varias de mis PCs.

En resumen, los tres archivos se llamarían de la primera forma como los indicaste. Para que la información esté un poco más en contexto, por ejemplo en una de mis PCs uso rclone para montar tres drives: Google Drive, OneDrive y un tercero que es OneDrive también pero encriptado.
Los puntos de montaje se llaman GDrive, OneDrive y encrypted y ese es el mismo nombre de los servicios de systemd. Por lo tanto los tres archivos que agregué en /etc/systemd/system/ son:

rclone-mount@GDrive.service
rclone-mount@OneDrive.service
rclone-mount@encrypted.service

Ten en cuenta que estos nombres son también los que me aparecen al llamar rclone config, osea, los servicios tienen que tener esos nombres.

@moha20051985
Copy link

Muchísimas gracias por el comentario, ya me ha quedado claro.
Con las pruebas de esta tarde ya he deducido que seria como me comentas, ya que poniendo con las < > me decia que no encotraba el archivo cuando ejecutaba sudo systemctl enable o con sudo systemctl start

Aun asi, ni creando uno simple estoy siendo capaz de montarlo, no se que estoy haciendo mal :(, ya que estoy cambiado simplemente por PEPITO. Pero nada..

Seguiré haciendo pruebas a ver que paso me estoy saltando.

Gracias

@juandpineiro
Copy link

@moha20051985 de recomendación si planeas montar varios remotes, comienza primero por un solo servicio y una vez que hayas logrado montar el remote, usa el contenido del archivo como plantilla para montar los otros.

Para encontrar cualquier error que pueda estar ocurriendo al momento de iniciar el servicio de systemd, pudes utilizar sudo systemctl status rclone-mount@PEPITO.service y otro muy útil es que tengas otra consola abierta corriendo el comando sudo journalctl -xf para ver cualquier error que aparezca en el momento exacto de iniciar el servicio.

También recuerda que los puntos de montaje ej:/mnt/PEPITO tienen que ser propiedad del mismo usuario que está ejecutando el servicio de systemd sudo chown -R usuario:usuario /mnt/PEPITO.

Suerte!

@moha20051985
Copy link

@moha20051985 de recomendación si planeas montar varios remotes, comienza primero por un solo servicio y una vez que hayas logrado montar el remote, usa el contenido del archivo como plantilla para montar los otros.

Para encontrar cualquier error que pueda estar ocurriendo al momento de iniciar el servicio de systemd, pudes utilizar sudo systemctl status rclone-mount@PEPITO.service y otro muy útil es que tengas otra consola abierta corriendo el comando sudo journalctl -xf para ver cualquier error que aparezca en el momento exacto de iniciar el servicio.

También recuerda que los puntos de montaje ej:/mnt/PEPITO tienen que ser propiedad del mismo usuario que está ejecutando el servicio de systemd sudo chown -R usuario:usuario /mnt/PEPITO.

Suerte!

Un millon de gracias por tu ayuda, YA LO HE CONSEGUIDO!!!!
eran el maldito grupo, siempre uso el mismo y no se por que estaba dejando rclone

MIL GRACIAS DE NUEVO!!!

un saludo

@moha20051985
Copy link

Os vuelvo a escribir, para ver si me podéis volver ayudar, llevo unos dias y no doy con ello....

Cuando los ejecuto con sudo systemctl start uno a uno a mano, estos se montan perfectos.
Realizo el sudo systemctl enable sobre cada uno de ellos y vuelvo a reiniciar, me los monta bien, pero de repente las Raspberry deja de conectarse a internet, le intento hacer un ping a google.com y no responde. Para que vuelva necesito desenchufar el cable ethernet y volver a enchufarlo.

He intentado que se monten con 5s de retraso poniendo un ExecStartPre=/bin/sleep XX antes de ExecStart= , pero me sigue haciendo lo mismo. Pero no se si me hace caso o no....

Sabéis pk me puede estar causando este error? O cuando es que pierde conexión o quizás sea algún problema de DHCP?

Lo que no es viable es que para que funcione correctamente después de cada reinicio tenga que desenchufar y volver a enchufar el cable de ethernet, ya que si se reinicia y no estoy perderé todos los servicios que requieran de internet

Saludos
y gracias

@juandpineiro
Copy link

juandpineiro commented Nov 5, 2022

Saludos!

Bueno leyendo los pasos que has seguido para tratar de que los montajes se realicen luego de un periodo de tiempo, pareciera que está todo en orden.

Una vez que modificaste los servicios, ejecutaste el comando sudo systemctl daemon-reload ? Para que systemd utilice los servicios modificados.

Otra cosa que podría ayudar es añadir la siguiente linea:

[Unit]
After=network.target

Es decir, la linea After=network.target justo después de [Unit] para que el servicio solo se ejecute una vez haya conexión de red. Esto debería eliminar la necesidad de sleep. De nuevo al hacer las modificaciones en los archivos, ejecuta sudo systemclt daemon-reload.

@moha20051985
Copy link

moha20051985 commented Nov 7, 2022

Saludos!

Bueno leyendo los pasos que has seguido para tratar de que los montajes se realicen luego de un periodo de tiempo, pareciera que está todo en orden.

Una vez que modificaste los servicios, ejecutaste el comando sudo systemctl daemon-reload ? Para que systemd utilice los servicios modificados.

Otra cosa que podría ayudar es añadir la siguiente linea:

[Unit]
After=network.target

Es decir, la linea After=network.target justo después de [Unit] para que el servicio solo se ejecute una vez haya conexión de red. Esto debería eliminar la necesidad de sleep. De nuevo al hacer las modificaciones en los archivos, ejecuta sudo systemclt daemon-reload.

Gracias por la ayuda, si ya recarge el daemon antes de de enable. sobre lo de After=network.target , ya esta metido en la cabecera. De todas maneras os paso mi montaje, por si hubiera algo raro...

[Unit]
Description=rclone fuse mount for %i
Documentation=https://gist.github.com/gmag11/dc139ffd6a8ca8b622e98ca6422f8d79
AssertPathIsDirectory=/%i
After=network.target network-online.target

[Service]
User=root
Group=root
Restart=on-failure
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/rclone mount %i: /%i --allow-other --vfs-cache-mode writes --buffer-size 256M --dir-cache-time 72h --drive-chunk-size 32M --fast-list --log-file /home/Rclone_logs/rclone_debug.log --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off
ExecStop=/bin/fusermount -uz /%i

[Install]
WantedBy=multi-user.target

Saludos y gracias de nuevo

@ADOBApps
Copy link

ADOBApps commented Mar 2, 2023

Buenas noches, vengo a compartirles la configuración con la que logré montar el servicio, seguí todas las intrucciones sin embargo no me funcionaba, (cabe resaltar que esto lo llevé a cabo en una antigua computadora con Lubuntu 18.04.5). Siguiendo las instrucciones lograba montar las unidades sin embargo el sistema de archivos no reconocía los "mountpoint" como carpetas y no era posible acceder a estos. Tras horas de busqueda, recordé que la función experimental rclone gui web había logrado montar las unidades sin problema, fui y revicé usando la documentación y logré llegar a esto

`[Unit]
Description=rclone FUSE mount for %i
#Wants=network-online.target
After=network-online.target

[Service]
Type=notify
TimeoutStopSec=60
Environment=GOMAXPROCS=2

User=root
Group=root

ExecStart=/usr/bin/rclone mount remote_drive: /media/SharedFiles/Gdrive_workstation
--config /home/user/.config/rclone/rclone.conf
--use-mmap
--poll-interval=15s
--vfs-cache-mode full
--tpslimit 10
--vfs-write-back 5000000000s
--vfs-cache-max-age 3600000000000
--vfs-cache-poll-interval 60000000000
--async-read
--attr-timeout 1000000000
--max-read-ahead 131072
--noappledouble
--umask 2
--uid 1000
--file-perms 666
--dir-perms 777
--gid 1000
--dir-cache-time 300000000000
--vfs-read-chunk-size 134217728
--allow-root
--allow-other
--default-permissions

ExecStop=/bin/fusermount -uz /media/SharedFiles/Gdrive_workstation

[Install]
WantedBy=multi-user.target
`

@ADOBApps
Copy link

ADOBApps commented Mar 2, 2023

Buenas noches, vengo a compartirles la configuración con la que logré montar el servicio, seguí todas las intrucciones sin embargo no me funcionaba, (cabe resaltar que esto lo llevé a cabo en una antigua computadora con Lubuntu 18.04.5). Siguiendo las instrucciones lograba montar las unidades sin embargo el sistema de archivos no reconocía los "mountpoint" como carpetas y no era posible acceder a estos. Tras horas de busqueda, recordé que la función experimental rclone gui web había logrado montar las unidades sin problema, fui y revicé usando la documentación y logré llegar a esto

`[Unit] Description=rclone FUSE mount for %i #Wants=network-online.target After=network-online.target

[Service] Type=notify TimeoutStopSec=60 Environment=GOMAXPROCS=2

User=root Group=root

ExecStart=/usr/bin/rclone mount remote_drive: /media/SharedFiles/Gdrive_workstation --config /home/user/.config/rclone/rclone.conf --use-mmap --poll-interval=15s --vfs-cache-mode full --tpslimit 10 --vfs-write-back 5000000000s --vfs-cache-max-age 3600000000000 --vfs-cache-poll-interval 60000000000 --async-read --attr-timeout 1000000000 --max-read-ahead 131072 --noappledouble --umask 2 --uid 1000 --file-perms 666 --dir-perms 777 --gid 1000 --dir-cache-time 300000000000 --vfs-read-chunk-size 134217728 --allow-root --allow-other --default-permissions

ExecStop=/bin/fusermount -uz /media/SharedFiles/Gdrive_workstation

[Install] WantedBy=multi-user.target `

@ADOBApps
Copy link

ADOBApps commented Mar 3, 2023

Buenas noches, vengo a compartirles la configuración con la que logré montar el servicio, seguí todas las intrucciones sin embargo no me funcionaba, (cabe resaltar que esto lo llevé a cabo en una antigua computadora con Lubuntu 18.04.5). Siguiendo las instrucciones lograba montar las unidades sin embargo el sistema de archivos no reconocía los "mountpoint" como carpetas y no era posible acceder a estos. Tras horas de busqueda, recordé que la función experimental rclone gui web había logrado montar las unidades sin problema, fui y revicé usando la documentación y logré llegar a esto

`[Unit] Description=rclone FUSE mount for %i #Wants=network-online.target After=network-online.target

[Service] Type=notify TimeoutStopSec=60 Environment=GOMAXPROCS=2

User=root Group=root

ExecStart=/usr/bin/rclone mount remote_drive: /media/SharedFiles/Gdrive_workstation --config /home/user/.config/rclone/rclone.conf --use-mmap --poll-interval=15s --vfs-cache-mode full --tpslimit 10 --vfs-write-back 5000000000s --vfs-cache-max-age 3600000000000 --vfs-cache-poll-interval 60000000000 --async-read --attr-timeout 1000000000 --max-read-ahead 131072 --noappledouble --umask 2 --uid 1000 --file-perms 666 --dir-perms 777 --gid 1000 --dir-cache-time 300000000000 --vfs-read-chunk-size 134217728 --allow-root --allow-other --default-permissions

ExecStop=/bin/fusermount -uz /media/SharedFiles/Gdrive_workstation

[Install] WantedBy=multi-user.target `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment