说明:我们很多人喜欢用VPS
做离线下载,不过由于有的服务器硬盘太小了,装不了太多电影资源啥的,我们就需要想办法了,之前说过可以通过挂载FTP
来增大空间,参考:Linux VPS通过安装CurlFtpFS来挂载FTP,这里再说个挂载Google Drive
网盘的方法,毕竟Google Drive
有15G
免费的空间,有的也有无限空间,都可以利用上去。
说明
本教程只适用Debian
/Ubuntu
系统,如果你是CentOS
或者其它Linux
系统,请使用以下命令安装rclone
:
curl https://rclone.org/install.sh | sudo bash
初始化配置和挂载方法和下面一样,开机自启可参考该教程→传送门。
安装
1、安装rclone
wget https://www.moerats.com/usr/shell/rclone_debian.sh && bash rclone_debian.sh
2、初始化配置
rclone config
会出现以下信息:
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> Rats #配置名称,随便填
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Dropbox
\ "dropbox"
9 / Encrypt/Decrypt a remote
\ "crypt"
10 / FTP Connection
\ "ftp"
11 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
12 / Google Drive
\ "drive"
13 / Google Photos
\ "google photos"
14 / Hubic
\ "hubic"
15 / JottaCloud
\ "jottacloud"
16 / Koofr
\ "koofr"
17 / Local Disk
\ "local"
18 / Mega
\ "mega"
19 / Microsoft Azure Blob Storage
\ "azureblob"
20 / Microsoft OneDrive
\ "onedrive"
21 / OpenDrive
\ "opendrive"
22 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
23 / Pcloud
\ "pcloud"
24 / Put.io
\ "putio"
25 / QingCloud Object Storage
\ "qingstor"
26 / SSH/SFTP Connection
\ "sftp"
27 / Union merges the contents of several remotes
\ "union"
28 / Webdav
\ "webdav"
29 / Yandex Disk
\ "yandex"
30 / http Connection
\ "http"
31 / premiumize.me
\ "premiumizeme"
Storage> 12 #选择12,Google Drive,注意该序列号会随时变化,看清楚再填
Google Application Client Id - leave blank normally.
client_id> #留空
Google Application Client Secret - leave blank normally.
client_secret> #留空
Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login.
service_account_file> #留空
Choose a number from below, or type in your own value
1 / Full access all files, excluding Application Data Folder.
\ "drive"
2 / Read-only access to file metadata and file contents.
\ "drive.readonly"
/ Access to files created by rclone only.
3 | These are visible in the drive website.
| File authorization is revoked when the user deauthorizes the app.
\ "drive.file"
/ Allows read and write access to the Application Data folder.
4 | This is not visible in the drive website.
\ "drive.appfolder"
/ Allows read-only access to file metadata but
5 | does not allow any access to read or download file content.
\ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.
Fill in to access "Computers" folders. (see docs).
Enter a string value. Press Enter for the default ("").
root_folder_id>
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file>
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n #输入n
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> n #输入n
If your browser doesn't open automatically go to the following link: https://accounts.google.com/o/ #打开该地址获取code
Log in and authorize rclone for access
Enter verification code>hjdd #输入你获取到的code
Configure this as a team drive?
y) Yes
n) No
y/n> n #输入n
--------------------
[Rats]
type = drive
client_id = 85042871
client_secret = D72gPc
scope = drive
token = {"access_token":"y902Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y #输入y
Current remotes:
Name Type
==== ====
Rats drive
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q #输入q保存退出
3、挂载为磁盘
#新建本地文件夹,路径自己定,即下面的LocalFolder
mkdir /root/GoogleDrive
#挂载为磁盘,下面的DriveName、Folder、LocalFolder参数根据说明自行替换
rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
DriveName
为初始化配置填的name
,Folder
为Google Drive
里的文件夹,LocalFolder
为VPS
上的本地文件夹。
挂载成功后,输入df -h
命令查看即可!
4、卸载磁盘
fusermount -qzu LocalFolder
开机自启
先新建systemd
配置文件,适用CentOS 7
、Debian 8+
、Ubuntu 16+
。
再使用命令:
#将后面修改成你上面手动运行命令中,除了rclone的全部参数
command="mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000"
#以下是一整条命令,一起复制到SSH客户端运行
cat > /etc/systemd/system/rclone.service <<EOF
[Unit]
Description=Rclone
After=network-online.target
[Service]
Type=simple
ExecStart=$(command -v rclone) ${command}
Restart=on-abort
User=root
[Install]
WantedBy=default.target
EOF
开始启动:
systemctl start rclone
设置开机自启:
systemctl enable rclone
其他命令:
重启:systemctl restart rclone
停止:systemctl stop rclone
状态:systemctl status rclone
如果你想挂载多个网盘,那么将systemd
配置文件的rclone.service
改成rclone1.service
即可,重启动什么的同样换成rclone1
。
相关链接
#解决Rclone挂载Google Drive时上传失败和内存占用高等问题
https://www.moerats.com/archives/877/
版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!
本文链接:https://www.moerats.com/archives/481/
如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。
请问 fusermount -qzu LocalFolder 这个命令有办法加在 systemd 的 stop 环节吗?
目前如果手动停止/重启服务,还需要手动执行解绑,否则服务会启动不了。
可以,systemd配置文件加一个ExecStop=/bin/fusermount -qzu LocalFolder ,具体你自己试试。
可以用了,多谢!
大佬,脚本的"i386"要改成386,不然会404
(用的树莓派的raspberry)
Failed to configure token: failed to get token: Post "https://oauth2.googleapis.com/token": dial tcp 172.217.24.10:443: i/o timeout
请问从Google上获得验证码之后为什么收到这个错误呢
好像是网络超时,国内服务器吗?
大佬,挂载以后上传文件倒是可以,而且速度很快,但是为什么没法删除呢?
应该是可以删的,看是不是权限啥的不够还是啥
如果挂载目录的文件还在上传,机器重启了,那这些文件是不是就丢失了呀
还是说,重启之后会继续传呢
上传会失败,不会继续。
挂载 gd 结果因为文件太多而卡住 太坑了
有时候是会吃点资源
请教个问题,挂载了两个团队盘。两个团队盘互相拷贝的时候,文件是先下载到vps上在上传到另一个团队盘,还是说直接从团队盘复制到了团队盘。
前者,就是做个中转而已
博主你好,挂载完成后所有者和权限都不能改吗,我想当做外部存储挂载在nextcloud,默认是www用户,好像没有权限
你是想直接当硬盘用?直接写入文件啥的
2020/05/04 13:49:29 Failed to configure token: failed to get token: Post https://oauth2.googleapis.com/token: read tcp 172.16.233.46:47702->216.58.200.234:443: read: connection reset by pee
用linux挂载出现了这个,不知道是什么问题,大佬能帮忙解决一下吗?
我也遇到这个问题,请问你解决了吗?
你好,请问如何新建systemd配置文件啊?
直接复制给的命令就行,cat 开头,eof结尾
博主您好!我的nextcloud的外部存储设置里没有出现smbclient的错误提示,但是为什么我还是挂载失败啊?
博主您好 我在挂载谷歌云盘时出现了这个提示;Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH. 请问我该怎么解决啊?谢谢!
没有安装fuse?直接apt install fuse,如果是ovz的,发工单要服务商给你开启
大佬,想挂载团队盘,但是却提示:No team drives found in your account--------------
这个是什么原因?
博主你好,我是在window下挂载google drive 环境是挂的v2ray得台湾节点
根据您给的配置输入从google返回得cookie时报错
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=202264815644.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=md69txiHB5wjWuR-hfqHIQ
Log in and authorize rclone for access
Enter verification code> hjdd 4/xAFOc7bZAmR64i2gOiadAwJKFNPB7zdobyv__nE2aMjF7Ea4vrlAAMs
2020/03/04 10:31:53 Failed to configure token: failed to get token: Post https://oauth2.googleapis.com/token: read tcp 10.9.0.7:61714->216.58.200.42:443: wsarecv: An existing connection was forcibly closed by the remote host.
请问这个问题是连接问题吗?
看起来好像是梯子的问题,试试sstap全局
博主,你好。我的vps上rclone挂载的团队盘状态显示active。但一两天了,文件夹下仍无法列出挂载的团队盘的目录,空间占用一直显示0。请问是什么原因,怎么解决?谢谢啦!
Filesystem Size Used Avail Use% Mounted on
udev 840M 0 840M 0% /dev
tmpfs 171M 6.1M 164M 4% /run
/dev/sda1 15G 5.6G 8.5G 40% /
tmpfs 851M 8.0K 851M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 851M 0 851M 0% /sys/fs/cgroup
GD:root 1.0P 0 1.0P 0% /root/GD
占用好像不是很准确,你看看挂载文件夹。
博主,你好。我的vps上rclone挂载的团队盘状态显示active。但一两天了,文件夹下仍无法列出挂载的团队盘的目录,空间占用一直显示0。请问是什么原因,怎么解决?谢谢啦!
你换个文件夹挂载看看。
rclone mount GoogleDrive: /home/GoogleDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
2020/02/16 16:22:50 mount helper error: fusermount: failed to access mountpoint /home/GoogleDrive: Transport endpoint is not connected
2020/02/16 16:22:50 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
以前能挂上的,现在不知道为什么挂不了了,一直报这个错,重新用rclone config 建了一个还是不行
fusermount -qzu LocalFolder
卸载后重新挂载解决了
终于挂上了。但是我想问一下博主,aria2自动上传脚本onedrive的和googledrive可以同时存在吗。在aria2.conf最后面同时加两条命令on-download-complete=/root/od.sh和on-download-complete=/root/gd.sh。我试了一下,同时存在两条的时候 所有的都不上传,但是又不会写顺序命令。
那个,大佬这个写到一起的格式是咋样的,,
大佬,我安装rclone前面都正常,安装到系统服务的时候就会报错,Failed to start rclone.service: Unit is masked. 然后在/etc/systemd/system目录下的rclone.service是空文件,0b大小。请问是什么原因呢,没有找到报错日志在哪里,系统是centos7
没有新建成功,你再试一下
重新安装了,还是一样的。
ok了,我自己弄好了。在rclone config里吧drive设置成team disk就可以了,感谢大佬
请问挂载一个无限Google Drive需要多长时间呢?我按教程来的,半个多小时了还没有返回的信息。服务器1核4G,洛杉矶。
这个没返回信息,其实已经挂好了,你额外开个窗口使用df -h查看
一直用的没问题,直到今天,第一步都报错。。。
--2019-12-08 19:27:45-- https://downloads.rclone.org/rclone-current-linux-amd64.zip
Resolving downloads.rclone.org (downloads.rclone.org)... 5.153.250.7, 2a02:24e0:8:61f9::1
Connecting to downloads.rclone.org (downloads.rclone.org)|5.153.250.7|:443... failed: Connection refused.
Connecting to downloads.rclone.org (downloads.rclone.org)|2a02:24e0:8:61f9::1|:443... failed: Network is unreachable.
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (206A7),ASM,AES-NI)
Scanning the drive for archives:
1 file, 0 bytes
Extracting archive: /tmp/rclone.zip
ERROR: /tmp/rclone.zip
Can not open the file as archive
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0
rclone_debian.sh: line 12: cd: rclone-*: No such file or directory
cp: cannot stat 'rclone': No such file or directory
chown: cannot access '/usr/bin/rclone': No such file or directory
chmod: cannot access '/usr/bin/rclone': No such file or directory
cp: cannot stat 'rclone.1': No such file or directory
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/zh_CN...
Processing manual pages under /usr/share/man/zh_CN...
Purging old database entries in /usr/share/man/ko...
Processing manual pages under /usr/share/man/ko...
Purging old database entries in /usr/share/man/hu...
Processing manual pages under /usr/share/man/hu...
Purging old database entries in /usr/share/man/de...
Processing manual pages under /usr/share/man/de...
Purging old database entries in /usr/share/man/sl...
Processing manual pages under /usr/share/man/sl...
Purging old database entries in /usr/share/man/it...
Processing manual pages under /usr/share/man/it...
Purging old database entries in /usr/share/man/nl...
Processing manual pages under /usr/share/man/nl...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/fr...
貌似解析到rclone的ipv6,导致下载失败,禁用下ipv6应该就好了。
那我去尝试下,看到这个报错我都懵了。。
你好,博主。
根据本文指导,按照操作成功挂载了ARIA2的下载文件夹和google drive
(1)root@localhost:~# df -h
boluo2:plan1 1.0P 105M 1.0P 1% /usr/local/caddy/www/aria2/Download
(2)root@localhost:~# systemctl status rclone
● rclone.service - Rclone
Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-11-30 02:33:24 EST; 5min ago
但是在aria2一开新任务,任务就失败。
在google drive是可以看到新任务产生的文件的,但是因为是失败的文件,所以完全打不开
想请教一下这是哪里出了错呢。
别把挂载盘当下载目录,可以下载到其它目录后,移动进挂载盘
理解。
可是我用xftp尝试将一张100k的图片从另一个文件夹复制到挂载文件夹,然后在50%就失败了
是因为虚拟机的配置太低吗,因为是试验性质,用的gcp cpu 1core 1.7g 10G硬盘
我看到博主有另外一篇博文,说到API也会影响,不知道是不是也有关系呢
盼解答,先多谢博主了
这个应该不会吧,才100k,得看日志才行
我在后面开始启动/设置开机自启的步骤里,发现不能成功。
状态:systemctl status rclone查看状态爆:
● rclone.service - Rclone Loaded: error (Reason: Bad message) Active: inactive (dead) Nov 25 19:59:21 10-8-31-36 systemd[1]: [/etc/systemd/system/rclone.service:8] Missing '='. Nov 25 20:02:46 10-8-31-36 systemd[1]: [/etc/systemd/system/rclone.service:8] Missing '='.但是我通过我的网站上传一张图片的时候是成功的,谷歌盘里也显示有
这个应该是你直接挂上了,所以上传没问题,systemctl状态的话,应该是配置文件不对,看提示好像是=的缘故
能否再介绍一下rclone 的webUI安装使用,感谢
这个很久前就玩过,感觉有点不太行,我过几天再看看有没有改进啥的
大佬,有没有群之类的什么,可以交流比较方便的?下面的人有问题也可以去群里面问啊。。。。
么得群,一般有问题的话,是先建议百度/谷歌
[root@host04 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 990M 0 990M 0% /dev
tmpfs 1000M 0 1000M 0% /dev/shm
tmpfs 1000M 8.5M 992M 1% /run
tmpfs 1000M 0 1000M 0% /sys/fs/cgroup
/dev/vda1 18G 3.1G 14G 19% /
tmpfs 200M 0 200M 0% /run/user/0
GoogleDrive: 1.0P 19G 1.0P 1% /data/rclone/GoogleDrive
[root@host04 ~]#
已经挂载了。为什么文件夹还是空的。
这个信息给的有点少,所以不太清楚,你可以检查下操作之类的。
大佬我在输入code是出现这个是什么意思Failed to configure token: failed to get token: Post https://oauth2.googleapis.com/token: read tcp ip:38670->ip:443: read: connection reset by peer
链接被重置了,是国内服务器么?
是的
挂载只适用国外服务器,需要能访问谷歌才行
您好,按照您的设置一步一步来,在AriaNg安装成功那一步,设置好RPC,仍然未连接。想问一下有可能是什么原因呢,
rclone挂载目录中的文件不占用VPS本地空间是吧?
不占用。
请问rclone上传完文件后,这个脚本会自动删除rclone挂载目录中的文件吗?还是说需要手动删除?
Aria2自动上传?一般都是自带上传就删除的。
Failed to create file system for "DriveName:Folder": didn't find section in config file
这是什么问题
修改参数DriveName:Folder,不要照搬就行了。这些是需要改成自己的
root@Angus:~# mv rcloned /etc/init.d/rcloned
LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system.root@Angus:~# chmod +x /etc/init.d/rcloned
root@Angus:~# update-rc.d -f rcloned defaults
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
perl: warning: Falling back to the standard locale ("C").
试试设置下变量,echo "export LC_ALL=C" >> ~/.bashrc && source ~/.bashrc
博主,我执行这个命令rclone mount gd:/ /root/GoogleDrive --umask 0000 --default-permissions --allow-non-empty --allow-other --buffer-size 32M --dir-cache-time 12h --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G挂载,用df -h看是有挂载上的,但是查看文件夹的时候就报错了ls: reading directory .: Input/output error
Error: invalid_client
The OAuth client was not found.
Request Details
access_type=offline
client_id=202264815644.apps.googleusercontent.com
redirect_uri=urn:ietf:wg:oauth:2.0:oob
response_type=code
scope=https://www.googleapis.com/auth/drive
state=ae823d3b47bab5804d4af4386e89db01
说你 OAuth client不存在,你直接enter使用默认就好。
博主,请问rclone mount d网盘之后,用一会儿,会断载。是因为系统不稳定吗?
rclone mount Gdrive-W:/video /mnt/rclone \
--umask 0000 \
--default-permissions \
--allow-non-empty \
--allow-other \
--transfers 4 \
--buffer-size 4G \
--low-level-retries 200 \
--dir-cache-time 12h \
--vfs-read-chunk-size 16M \
--vfs-read-chunk-size-limit 256M
我用的这参数。
看是不是内存啥问题搞的爆了。
看日志上确实提示有提示out of memory usage. 这plex加rclone有点吃内存啊,我都8内存了都不够它霍霍嘛。我去给他再加8G swap试试。
是的,我之前都是10G swap起步。
整个好用的plex-vps服务器真是不容易,各种问题都遇到,国内国外论坛一顿翻阅,都解决了个遍,感觉要无敌了。
博主,使用rclone挂载网盘,然后复制本地文件到这个挂载盘地址的效果和使用rclone copy直接复制本地文件到网盘的效果一样吗?
使用第一种方式一直复制文件会不会让vps存储空间爆炸?
这种其实差不多的,不过挂载更方便些,还可以直接用服务器做中转直接下载/观看,但有点消耗资源内存啥的,爆炸倒不会,只见过因为内存小而挂掉的。
macOS怎么用rclone挂载gd到本地?不知道路径在哪里
macos还没试过,方法应该都差不多,你可以看下官方文档。https://rclone.org/install/
你好,博主挂无限空间是不是要管理员的账户才可以,被管理员拉进去的成员账户不行吗?
不需要管理员账户
你好,问一下第3步,新建本地文件夹的名字,可以是中文吗?
没试过中文,你可以尝试下
请问我敲完挂载命令后回车,然后终端工具就没有任何提示,没有报错什么的,就是回车后等待刷新出命令那种状态。这是什么原因呢?难道我虚拟机的磁盘空间不够?(这次我在虚拟机上运行的。Debian9.9)
额外再开个窗口使用df -h看下挂上了没
经过我多次测试,假死后等个10几秒,断开重连就显示挂载了,当然screen也应该可以。
我发下一个问题,我挂载了webdev 但是挂载之后 上传到我原来网盘的东西不同步,
是不是意味着我以后上传没办法再原始网盘中上传了
只能通过vps这个地址 上传。
我的意思是我可以上传到原来网盘,然后自动同步过来吗?
应该来说是通的,网盘那边的文件和vps挂载的文件夹可以互相上传,前提要有权限啥的
但是我现在遇到了问题,我挂载的硬盘,现在不能读写,可是我已经chmod777了
好像是挂载的时候选择的权限吧?
挂载完成后,用了几天,突然显示我5T的onedrive用了1019T容量,实际上我通常就用了1、2G左右。但又不影响正常使用。什么鬼。
这个应该计数出现了问题,不影响使用
root@LsyIuAn:~# #新建本地文件夹,路径自己定,即下面的LocalFolder
root@LsyIuAn:~# mkdir /root/GoogleDrive
mkdir: cannot create directory ‘/root/GoogleDrive’: File exists
root@LsyIuAn:~# #挂载为磁盘
root@LsyIuAn:~# rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
2019/04/22 13:55:29 Failed to create file system for "DriveName:Folder": didn't find section in config file
哥,这是啥情况哇
参数填对,别直接复制DriveName:Folder LocalFolder
root@LsyIuAn:~# rclone mount Lsy:VPS GoogleDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
参数调对啦,回车之后没反应=-=
没反应一般就可以了,你使用df -h查看下
root@LsyIuAn:~# rclone mount Lsy:VPS GoogleDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
root@LsyIuAn:~2019/04/25 22:52:59 mount helper error: fusermount: failed to access mountpoint /root/GoogleDrive: Transport endpoint is not connected
2019/04/25 22:52:59 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
这个GoogleDrive换成绝对路径
而且我发现教育办的都没有API权限qwq
是的,除非是管理员才有权限
怎么换成绝对路径哇0.0
比如你在主目录,也就是root目录新建GoogleDrive文件夹,那绝对路径就是/root/GoogleDrive
root@LsyIuAn:~# apt install fuse -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
fuse is already the newest version (2.9.7-1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
我执行了命令~~~
root@laulzgoay:~# mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2019/04/20 06:22:23 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
安装下fuse,apt install fuse -y,如果你是ovz的话,可能还需要工单要主机商给你开通fuse
是ovz
那发工单要主机商开下
[root@srttgglsy ~]# curl https://rclone.org/install.sh | sudo bash
Dload Upload Total Spent Left Speedsudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /usr/libexec/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
% Total % Received % Xferd Average Speed Time Time Time Current
100 4276 100 4276 0 0 6907 0 --:--:-- --:--:-- --:--:-- 6896
curl: (23) Failed writing body (220 != 400)
试试curl -sL https://rclone.org/install.sh | sudo bash
[root@srttgglsy ~]# curl -SsL https://rclone.org/install.sh | sudo bash
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /usr/libexec/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
curl: (23) Failed writing body (220 != 400)
还是不行,我的VPS是OVZ=-=
开了fuse的ovz也是可以用的
Updating index cache for path `/usr/local/share/man/man8'. Wait...done.
Checking for stray cats under /usr/local/share/man...
Checking for stray cats under /var/cache/man/local...
104 man subdirectories contained newer manual pages.
14767 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
联系客服开了fuse 没复制完全,这是最后几行,我是ovz centos7
这个貌似与mandb有关系,你可以谷歌下,或者换个系统
2019/03/26 21:36:40 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2019/03/26 21:36:40 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
服务商说开了fuse
开了的话,有没有安装fuse
安装了
Apt-ge5 install fuse
安装的时候有安装信息输出吗?还有重启下服务器看看
root@canon:~# apt-get install fuse Reading package lists... Done
Building dependency tree
Reading state information... Done
fuse is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 151 not upgraded.
root@canon:~# rclone mount 1: /root/Download --allow-other --allow-non-empty --vfs-cache-mode writes
2019/03/28 19:47:44 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2019/03/28 19:47:44 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
root@canon:~#
你这个挂载参数看起来怎么是个错的
root@canon:~# rclone mount 1: /root/Download --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
2019/03/30 02:22:24 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2019/03/30 02:22:24 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
root@canon:~#
这个你发工单问下,说你安装fuse,却加载不了
我name是 GD,谷歌网盘里的文件夹是VPS,小鸡上的文件夹是/root/GoogleDrive
那我用的代码是
rclone mount GD:/VPS /root/GoogleDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
这个有没有问题?
现在用这个代码不行,Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH
怎么回事?
如果你是ovz需要发工单开启fuse,kvm需要使用命令。
Debian/Ubuntu系统apt-get install fuse -y
CentOS系统yum install fuse -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-headers-4.12.9-041209-generic : Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
KVM的,好像无法开启
可以的,你谷歌下,只要把fuse装上就行了
我想把一个GD挂两个位置,一下是读写权限给PT用,一个是只读权限给EMBY用,挂载没问题
我想问那个自启文件什么怎么编辑.
挂载后,别直接当成下载盘,会出问题,只能移动进去,开机自启可以参考这个文章https://www.moerats.com/archives/870/,单独建2个文件,rclone1和rclone2就可以了管理了。
你https://www.moerats.com/archives/870/说的是在/etc/systemd/system下建两个文件没问题.
我这边已经按上面 教程操作了/etc/init.d/ 下的自启,那rclone文件直接删掉就行了是吗?
对,这个不需要了。
你好,按照你的教程成功挂载了google drive,问一下我用winscp连上主机下载google drive挂载的文件的时候,数据流是:google drive->我的主机->我的电脑么,这样是不是消耗了进站和出站双倍的的流量
按理说是这样的,需要消耗双倍流量,不过很多只算单向的服务器可以无视
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Full access all files, excluding Application Data Folder.
"drive"
2 / Read-only access to file metadata and file contents.
"drive.readonly"
/ Access to files created by rclone only.
3 | These are visible in the drive website.
| File authorization is revoked when the user deauthorizes the app.
"drive.file"
/ Allows read and write access to the Application Data folder.
4 | This is not visible in the drive website.
"drive.appfolder"
/ Allows read-only access to file metadata but
5 | does not allow any access to read or download file content.
"drive.metadata.readonly"
scope>
这里该选那个
选过1和3最后提示Failed to create file system for "DriveName:/ero": didn't find section in config file,哪里出错了
这个一般是权限问题,选择1就可以了,后面的没配置了很多次都没遇到过,你重新配置看看,步骤不要错
NOTICE: Time may be set wrong - time from "www.googleapis.com" is -22m47.343563393s different from this computer
时间要怎么调?
调时间的话,百度一下
请问下:Error while copying file to target location (copied bytes: 0, expected filesize: 3422507 )
重新复制看看
博主,请问下,您试过最近一个月内重新挂在过吗?按照您的方法,试了几个gmail账号,最后虽然都挂载成功了,但却都无法使用,均出现一个问题,就是Error while copying file to target location。求解!!!
按照您的指导一步一步安装好了,显示是绿√,文件里也有了一个目录。就是:①gd那边上传文件后,在nc相应文件夹里没有任何文件;②在nc对应的文件夹里上传资料,就显示上面的复制文件到目标位置错误;③以为是设置时哪里出了问题,我设置了几遍,重新登录后台,发现有3个外挂谷歌盘,内存显示都一样。(另外,特别想请问下,DriveName:Folder LocalFolder这行命令中的Folder ,是自己在谷歌云盘下创建的一个文件夹吧?) 感谢博主辛勤付出和帮助!
对,Folder就是网盘文件夹路径,如果你直接挂载根目录,那使用/就行了,如果是根目录的xx文件夹,那就使用/xx
老大 修改一下内容:以后如何保存并推出到下一步?谢谢
不会编辑命令的用ftp软件登录vps修改吧。
所有步骤都安装正确,挂载成功,也设置了自启,没有报错,就是重启后不会自启动,系统是ubuntu16.04
自启也可以参考这个文章https://www.moerats.com/archives/870/
同时挂载onedrive和google drive改怎么配置
一次挂一个看看,这是挂载onedrive教程:https://www.moerats.com/archives/491/。
开机 rclone 启动失败,有办法吗
什么系统?办法肯定是有的,最不操心的办法就是换系统。
用的是armbian,用的设备的是斐讯N1盒子。
这个没玩过,不是很清楚。
阿里云轻量我试了挂不上
没什么提示?
博主你好,按照这个教程,我把googledrive挂载到了vps上,同时安装了plex。我在添加资料库的时候,也看到了所建文件夹,但是添加之后里面没有内容。想请教一下,能不能利用这种方式,添加我googledrive里的电影到plex中?谢谢
按理说应该可以读取GD里的电影,你爬Q看看有不有内容,还是没有的话,检查下GD里的文件,或者看配置的时候授权对不对。
好的,谢谢
root目录权限设置777就可以了
求助作者大大,挂载成功了google drive到vps上面的nextcloud上面了
但是遇到一个问题是,在google drive上传文件,在nextcloud这边看不到,但是在nextcloud这边上传文件,是可以在google drive目录下看到的,很奇怪……
会不会是挂载的时候权限设置的不对?
感谢回复,对照着教程又走一遍发现问题了。
是这句“rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
”的localfolder目录多填写了root,已经改好了
另外想请问一下是不是这个reclone挂在外部目录google drive后速度不是很快?
因为我在vps里面还搞了一个nextcloud,然后我把这个google drive添加到nextcloud里面了
但是播放里面的视频文件时速度很不理想……
挂载体验肯定不如自身硬盘的读取。
嗯嗯,我也觉的多少会有点慢吧。
但我之前是照着一个搭建云播平台的视频做的……正好里面涉及到vps通过rclone挂载googledrive
我看教程视频里搭建好播放挂载的google drive目录下的视频速度还是挺快的,所以很好奇………………
其实快不快主要与服务器网络有关,网络好,带宽大,速度明显的会有提高。
感谢回复,我也是专门用了一条东京线路,延迟大概在99ms左右,梯子看youtb上面的4K60fps视频速度很快,所以我觉的网速问题应该不大。
另外是下面这个自启动脚本,我修改完里面的3项内容后ctrl+x 然后y 之后询问是否保存rclone我直接回车就OK吧
但是在运行mv rcloned /etc/init.d/rcloned命令的时候提示mv: cannot stat 'rcloned': No such file or directory
最后提示[信息] rclone (PID 31889) 正在运行...这个……跟您图里的内容不太一样。。。
意思是你当前目录没有rcloned这个文件。
这个脚本我其实执行了两次,第一次全部都OK……
但是因为我把这个挂载的外部储存添加到nextcloud下面了
于是我发现在nextcloud下操作文件可以实时在gd下面看到,但是在gd下面操作文件nextcloud这边没有反应……
我就以为是挂载的问题,还重新挂载和重新运行这个自启动脚本
2018/11/01 04:26:47 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH
OVZ架构的服务器?
不是呀,独服。就是执行最后一步挂载云硬盘的时候出问题的
安装下fuse看看,apt install fuse -y
rclone: command not found 错误
第一步有安装吗?只要安装那个脚本,且不报错,就不会有这个提示了。
自启下载的脚本在那个文件夹改名呀,挂载多个盘
什么意思。
博主我想用Google云里面VM实例来代替VPS可否挂载Google driver。
我试过, 可以
你可以试试,我没玩过。
发现个好玩的功能:可以用这个方法把google drive 直接smba 共享在本地,然后可以作为某些支持本地转存功能摄像头的免费视频转存空间!
这个我研究下。
昨天是拿大方挂到Google drive上,结果今天收到google photo自动生成的n个新电影...现在在尝试oneDrive,应该毕竟oneDrive大得多。要是有能挂载百度网盘的工具就好了,毕竟那个更大
其实googledrive更好用些。
是的,我发现了,one drive文件通过samba传上去后都不完整,一般就剩下100多k,也不知道是为啥。刚刚新注册了个google专门存储视频
所以我很多情况下都是用GD。
可能把10个gd合成一个大的逻辑盘吗?
这个没试过,你可以试试,有想象力就敢于尝试。
NAME="" #rclone name名,及配置时输入的Name
REMOTE='' #远程文件夹,Google Drive网盘里的挂载的一个文件夹
LOCAL='' #挂载地址,VPS本地挂载目录
请问自启动这部分,如果我需要同时挂载两个网盘(Google、OneDrive),应该如何设置呢?
你要是有点基础的话,自己修改脚本,像Name这些参数搞2个,下面命令也额外添加个,如果不会,你可以直接用2个自启脚本,把脚本名字变一下。
改好了,谢谢!
rclone安装成功,docker安装resiliosync和cloudtorrent,下载文件到挂载的GoogleDrive文件夹却没有写入权限该如何解决?
直接使用命令把文件移动到挂载的文件夹可以么?
博主可以写一个Resiliosync+Rclone+GoogleDrive一键安装脚本么?我愿意付费,电报联系我。http://t.me/yangleitj
在vps上用命令操作都可以。直接运行还是docker运行rsync下载到挂载盘就不行,下载到其他位置就可以。文件夹权限改成777也不行。博主请帮帮我,付费也可以,我们可以用电报沟通么?
。。帮不了啊,貌似不能直接把挂载盘用作下载盘,只能建议你使用命令移动进去,至于脚本的问题,其实手动挺方便的,你说的这些博客单独都有教程,结合起来就行了。
博主的google drive稳定吗
稳定,我是申请的美国大学edu。
rclone连不上Google怎么破
Failed to configure token: failed to get token: Post https://accounts.google.com/o/oauth2/token: net/http: TLS handshake timeout
应该是网络问题,重新试试看。
我也是这个问题,和https://forum.rclone.org/t/new-a-google-drive-remote-has-a-problem/4031 里反映的一样,有人回复说是代li的问题,我用的是55,不知道应该如何设置?
哦,我弄好了,最后显示rclone正在运行,和启动成功一个意思吗?
对的
你是用的国内服务器吗?
安装了quickbox后怎么就挂挂载不上啊,说是没有挂载点
尴尬了,自己的吧代码多打了一个空格···
NAME="" #rclone name名,及配置时输入的Name
REMOTE='' #远程文件夹,Google Drive网盘里的挂载的一个文件夹
LOCAL='' #挂载地址,VPS本地挂载目录
这个下载后怎么修改啊,用什么编辑啊
可以用Winscp软件登录修改,也可以使用nano等命令编辑。
博主,rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 , 卡在了挂载这一步,总是不成功,该怎么办?
可能挂上去了,你额外开个ssh窗口查下。
真的成功了,谢谢博主
问个问题.rclone只能挂载一个vps下的单个目录么?挂俩目录行不行?
这个你试试看,我没研究过这个问题。
博主,自启动老是不成功。重启vps就没挂载项了,运行就报rclone启动失败。在挂载为磁盘那一步没反应,我直接断开连接了,发现挂载成功了,就是重启就没了
卡住很正常,实际上是 挂成功了,你先安装下sudo,apt install sudo -y。
显示的是正在运行,和启动成功一个效果吗
文件夹也无法利用scp再里面创建
如果步骤没问题,大概是rclone的问题,这个我也没法。
2018/05/26 07:45:44 ERROR : vultr.com.100MB.bin: WriteFileHandle.New Rcat failed: can't make bucket without project number
2018/05/26 07:45:44 ERROR : vultr.com.100MB.bin: WriteFileHandle.Write error: io: read/write on closed pipe
2018/05/26 07:45:44 ERROR : vultr.com.100MB.bin: WriteFileHandle.Flush error: can't make bucket without project number
这个是我复制的时候显示的
请问为什么我按照这个挂载了之后无法向里面存文件
脚本没问题,不过我把sudo删掉才行,因为我常年root,而且没有sudo命令
debian系统?
嗯,我也发现了开机无法自启的问题,特意折腾出chkconfig看了下,跟nginx php-fpm ss这些优先级一样,照理说是不应该无效的,我打算试一下systemd了
我用这个脚本手动bash /etc/init.d/rcloned start可以挂载,但是重启没有自启动,是什么问题呢
其它几条命令也运行了?
运行 update-rc.d -f rcloned defaults 会有提示吗?我运行了没有任何提示
对啊,都是一步步照着来的。。。我单独把挂载的命令加在rc里也自启不了
那个没提示,你是什么系统?
亚马逊lightsail的机器,自己重装的纯净Debian8 64,刚才换成亚马逊自带的Debian8就OK了,都是同样的步骤。。。算了,不折腾了,就用亚马逊得了
我的 无限网盘打不开api 校方限制
试试这个:https://www.moerats.com/archives/593/。
博主你好,请问一下,我进行到挂载为磁盘时,会出现failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH的报错,Google了一下,安装了fuse后,在进行挂载,回车后迟迟没有返回值,一直卡住不动。使用CentOS7*64
卡住不动的话,可能已经挂上去了,你用df -h看看。
博主 自动启动我开不到啊
开不到是啥意思?
不知道是不是我不会用博主自启脚本 手动更改成功了
谢谢
就是没有开机启动
现在还挂载不了了。。。
mount helper error: fusermount: failed to access mountpoint /www/wwwroot/chowvin*.tk/gdrive: Transport endpoint is not connected
2018/03/26 18:53:44 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
这个错误提示一般是OVZ架构才提示,工单要求开启FUSE就可以了。如果是KVM,安装FUSE即可。
我也遇到这个错误了,发了工单开了fuse还是无法挂载

也是这个提示?
想问博主一个问题,能不能用rclone将gdrive上的特定一个文件下载到vps上去,或者用什么办法可以将单个文件从gdrive下载到vps上
挂载后,直接复制粘贴就可以了。
不挂载不可以么
在网盘分享后,wget试试。