Tutorial on mounting OneDrive, Google Drive and other network disks (Linux) with Rclone



Rclone is a command-line tool that supports synchronization, uploading, and downloading data between different object storage and network disks . And through some settings, very practical functions such as offline downloading and server backup can be realized. There are many ways to use Rclone, and mounting is one of them.

Friendly reminder: Mounting this operation is not necessary. As an experimental feature, it has many limitations and problems. After mounting, it cannot be used as a real disk. When performing file operations, the local disk will be used for caching, which takes up local disk space. Improper use may also cause problems such as disk fullness and VPS freezing. Search "Rclone" on Google, and the most related keyword is "mount", which to a certain extent is misleading to many new friends. To perform uploading, downloading, synchronization and other operations stably, it is recommended to use Rclone's native command function. For usage methods, please refer to " Rclone Advanced Usage Tutorial - Common Command Parameters ".The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

Install and configure Rclone

The official one-click installation script is provided:The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

< span class = "token function" > curl < /span > https ://rclone.org/install.sh <span class="token operator">|</span> <span class="token function">sudo< /span> <span class="token function">bash</span>The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

After installation, enter  rclone config the command to enter the interactive configuration option and follow the prompts step by step. If you are confused, you can read the "Rclone Installation and Configuration Tutorial " to understand the detailed configuration process.The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

Install fuse

Mounting requires fuse to be installed. Choose the installation command according to your system:The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

< span class = "token comment" ># Debian/Ubantu</span>The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

< span class = "token function" > apt-get < /span > update < span class = "token operator" > && < /span > < span class = "token function" > apt-get < /span > < span class = "token function" > install < /span > -y fuseThe article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

< span class = "token comment" ># CentOS</span>The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

yum < span class = "token function" > install < /span > -y fuseThe article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

Mount network disk

Mounting the network disk is divided into manual mounting and automatic mounting at startup. You can choose according to your own needs.The article originates fromSinsTu NI-https://www.sinstu.com/archives/44.html

Manual mounting

< span class = "token comment" >#Mount</span>

rclone < span class = "token function" > mount < /span > < span class = "token operator" ><< /span > Network disk name: Network disk path < span class = "token operator" >>< /span > < span class = "token operator" ><< /span > Local path < span class = "token operator" >>< /span > < span class = "token punctuation" >[< /span > Parameters < span class = " token punctuation" >]< /span > --daemon

< span class = "token comment" >#Cancel mounting</span>

fusermount -qzu < span class = "token operator" ><< /span > Local path < span class = "token operator" >>< /span >

网盘名称It is filled in during configuration  nameand 网盘路径is a folder in the network disk. Leave blank to represent the entire network disk and 本地路径a local folder on the VPS. 参数You can check the official documentation to make a selection based on your needs. Do not use parentheses when typing, this is just to make the distinction clearer. --daemon It is a process daemon parameter and can be run in the background.

Usage example

Enter the command to mount:

rclone < span class = "token function" > mount < /span > Onedrive:/ /Onedrive --copy-links --allow-other --allow-non-empty --umask 000 --daemon

Then enter  df -h the command to check the mounting status.

root@P3TERX:~ < span class = "token comment" ># df -h</span>

Filesystem Size Used Avail Use% Mounted on

udev 286M < span class = "token number" > 0 < /span > 286M < span class = "token number" > 0 < /span > % /dev

tmpfs 60M < span class = "token number" > 7 < /span > .8 M 52M < span class = "token number" > 14 < /span > % /run

/dev/sda1 99G 25G 71G < span class = "token number" > 26 < /span > % /

tmpfs 297M 24K 297M < span class = "token number" > 1 < /span > % /dev/shm

tmpfs < span class = "token number" > 5 < /span > .0 M < span class = "token number" > 0 < /span > < span class = "token number" > 5 < /span > .0 M < span class = "token number" > 0 < /span > % /run/lock

tmpfs 297M < span class = "token number" > 0 < /span > 297M < span class = "token number" > 0 < /span > % /sys/fs/cgroup

Onedrive: < span class = "token number" > 5 < /span > .0 T 216G < span class = "token number" > 4 ​​< /span > .8 T < span class = "token number" > 5 < /span > % /Onedrive < span class = "token comment" >#This is the mounted network disk</span>


fusermount -qzu /Onedrive

Automatically mount on boot

  • Download and edit the autostart script

< span class = "token function" > wget < /span > -N git.io / rcloned < span class = "token operator" > && < /span > < span class = "token function" > nano < /span > rcloned

  • Modification content:

NAME= "Onedrive" #The name filled in during Rclone configuration

REMOTE= '' #Remote folder, a folder mounted in the network disk, leave it blank for the entire network disk

LOCAL= '/Onedrive' #Mount address, VPS local mounting directory

  • Set up auto-start at power on

< span class = "token function" > mv < /span > rcloned /etc/init. d /rcloned

< span class = "token function" > chmod < /span > +x /etc/init. d /rcloned

update-rc. d -f rcloned defaults < span class = "token comment" ># Debian/Ubuntu</span>

< span class = "token function" > chkconfig < /span > rcloned on < span class = "token comment" ># CentOS</span>

< span class = "token function" > bash < /span > /etc/init. d /rcloned start

Just see it  [信息] rclone 启动成功 ! .


Start mounting bash /etc/init.d/rcloned start

Stop mounting bash /etc/init.d/rcloned stop

Remount bash /etc/init.d/rcloned restart

View log tail -f /$HOME/.rclone/rcloned.log

Uninstall self-starting mount

bash /etc/init. d /rcloned stop

update-rc. d -f rcloned remove # Debian/Ubuntu

chkconfig rcloned off # CentOS

rm -f /etc/init. d /rcloned


rclone official documentation

Use rclone to mount OneDrive network disk on Debian/Ubuntu

Pagoda panel docker failed to start and yum update failed: rpmdb: BDB0113 Thread/process 2673/140126198814528 failed: BDB1507 Thread died

 If the Pagoda panel fails to start docker , first check whether there are official updates , or ask the official

If it is determined that it is not an official problem, then it may be an error in the yum command.

Use command

yum update
If the update fails, it is basically certain that the failure of docker to start is caused by yum dependencies. The prompt is as follows:

yum update failed: rpmdb: BDB0113 Thread/process 2673/140126198814528 failed: BDB1507 Thread died

Clear, execute the following commands step by step, then update yum, and finally try restarting docker

#cd /var/lib/rpm
Basenames __db. 001 __db. 003 Group Name Packages Requirename Sigmd5
Conflictname __db. 002 Dirnames Installtid Obsoletename Providename Sha1header Triggername
#rm -rf __db*
#rpm --rebuilddb

If it still doesn't work, change the source with one click and try reinstalling docker.

bash <( wget --no-check-certificate -qO-

Run the following command on the server terminal to install it.

/bin / bash /www/server/panel/install/install_soft.sh 0 install docker_install


But the old version of the Pagoda panel is useless no matter how much you try. The smart command terminal installs it directly.

The following are some practical notes that the author recorded during the process of learning to build docker. I also encountered some pitfalls during the process, but they were all solved. I will record them here for direct reference when building again in the future.

1. First, check the CentOS version to ensure that it is CentOS7 or above and the system kernel is above 3.10——

[ root@ 192 opt ]# uname -r
3.10 . 0 - 693. el7 . x86_64

2. Uninstall the old docker version

sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest-logrotate \
docker-logrotate \

3. Install the required dependency packages

sudo yum install -y yum-utils
4. Set up a domestic mirror warehouse

sudo yum-config-manager \
--add-repo \

5. Update the yum package index

yum makecache fast
6. Install docker-related docker-ce community docker ee enterprise version

sudo yum install docker-ce docker-ce-cli containerd.io
7. Start docker

systemctl start docker
At this time, a very strange exception occurred:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

Don’t panic, let’s check the daemon.json file format first:

vim /etc/docker/daemon.json
I found that the daemon.json file looks like this, and I don’t know why it is missing some characters after updating and downloading it directly...

It needs to be modified like this, that’s it

{"registry-mirrors": ["http://9600955f.m.daocloud.io"],
"insecure-registries": []

Next, you can start docker normally——

[root@192 opt]# systemctl daemon-reload
[root@192 opt]# systemctl start docker

If no error is reported, enter systemctl status docker.service. If the following information is displayed, the installation is started and the startup is successful:

After successful installation, when using docker version, the following information will generally appear:

[ root@ 192 opt ]# docker version
Client: Docker Engine - Community
Version: 20.10 . 8
API version: 1.41
Go version: go1. 16 . 6
Git commit: 3967b7d
Built: Fri Jul 30 19 : 55 : 49 2021
OS/Arch: linux/amd64
Experimental: true
Server: Docker Engine - Community
Version: 20.10 . 8
API version: 1.41 ( minimum version 1.12 )
Go version: go1. 16 . 6
Git commit: 75249d8
Built: Fri Jul 30 19 : 54 : 13 2021
OS/Arch: linux/amd64
Experimental: false
Version: 1.4 . 9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
Version: 1.0 . 1
GitCommit: v1. 0 . 1 - 0 -g4144b63
Version: 0.19 . 0
GitCommit: de40ad0

When trying to pull down hello-world, a timeout problem occurred:

[root@192 opt]# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:393b81f0ea5a98a7335d7ad44be96fe76ca8eb2eaa76950eb8c989ebf2b78ec0": net/http: TLS handshake timeout.
See 'docker run --help'.

At this time, you need to change the information in the daemon.json file to the domestic Alibaba Cloud image configuration, which can improve the pulling speed and avoid timeout problems, as follows:

{"registry-mirrors": ["https://6kx4zyno.mirror.aliyuncs.com"],
"insecure-registries": []
Then, restart systemctl restart docker.

[root@192 opt]# sudo systemctl restart docker
and try to execute docker run hello-world again. This time it works fine:

[root@192 opt]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:393b81f0ea5a98a7335d7ad44be96fe76ca8eb2eaa76950eb8c989ebf2b78ec0
Status: Download ed newer image for hello- world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
Check whether the hello-world image has been successfully downloaded. You can see that the hello-world image has been pulled into docker:

root@192 opt]# docker images
hello-world latest feb5d9fea6a5 40 hours ago 13.3kB
nginx latest f35646e83998 11 months ago 133MB
ubuntu latest 549b9b86cb8d 21 months ago 64.2MB