Skip to content

Instantly share code, notes, and snippets.

@groundcat
Last active March 1, 2023 09:03
Show Gist options
  • Select an option

  • Save groundcat/7ca5cc739212212aa9232e5b21d74439 to your computer and use it in GitHub Desktop.

Select an option

Save groundcat/7ca5cc739212212aa9232e5b21d74439 to your computer and use it in GitHub Desktop.
Use rclone mount on LXC OpenVZ VPS
yum --enablerepo=epel -y install fuse-sshfs
mknod -m 666 /dev/fuse c 10 229
rclone mount googledrive: /path/to/local/disk --allow-other --allow-non-empty --vfs-cache-mode writes

sudo update-rc.d -f udev disable

Start when boot

nano /usr/lib/systemd/system/rclone.service

Write (replace the rclone command below):

[Unit]
Description=rclone

[Service]
User=root
ExecStartPre=/usr/bin/mknod -m 666 /dev/fuse c 10 229
ExecStart=/usr/bin/rclone mount googledrive: /path/to/local/disk --allow-other --allow-non-empty --vfs-cache-mode writes
Restart=on-abort

[Install]
WantedBy=multi-user.target

Enable it

systemctl daemon-reload
systemctl start rclone
systemctl enable rclone

Reboot

reboot now

Ref: https://blog.csdn.net/weixin_42527192/article/details/95783945

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