國外主機測評之前寫過很多掛載 第三方存儲教程,比如Google Drive ,但是Google Drive空間不是很大,而 OneDrive 有 5T 的空間,所以準備把 OneDrive 掛載到搬瓦工的VPS上去使用。OneDrive 的掛載方法和 Google Drive 大部分是差不多的,但 OneDrive 的授權要麻煩一些。這里簡單記錄一下配置的過程。

下載安裝
使用腳本下載安裝 Rclone:
curl https://rclone.org/install.sh | sudo bash
初始化配置
安裝完成后輸入:
rclone config
可以看到:
2021/04/14 07:14:46 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config
輸入 n 新建配置。
name 可以隨便輸入,
然后會出現掛載的服務類型,如下:
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 Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, and Tencent COS
/ "s3"
5 / Backblaze B2
/ "b2"
6 / Box
/ "box"
7 / Cache a remote
/ "cache"
8 / Citrix Sharefile
/ "sharefile"
9 / Compress a remote
/ "compress"
10 / Dropbox
/ "dropbox"
11 / Encrypt/Decrypt a remote
/ "crypt"
12 / Enterprise File Fabric
/ "filefabric"
13 / FTP Connection
/ "ftp"
14 / Google Cloud Storage (this is not Google Drive)
/ "google cloud storage"
15 / Google Drive
/ "drive"
16 / Google Photos
/ "google photos"
17 / Hadoop distributed file system
/ "hdfs"
18 / Hubic
/ "hubic"
19 / In memory object storage system.
/ "memory"
20 / Jottacloud
/ "jottacloud"
21 / Koofr
/ "koofr"
22 / Local Disk
/ "local"
23 / Mail.ru Cloud
/ "mailru"
24 / Mega
/ "mega"
25 / Microsoft Azure Blob Storage
/ "azureblob"
26 / Microsoft OneDrive
/ "onedrive"
27 / OpenDrive
/ "opendrive"
28 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
/ "swift"
29 / Pcloud
/ "pcloud"
30 / Put.io
/ "putio"
31 / QingCloud Object Storage
/ "qingstor"
32 / SSH/SFTP Connection
/ "sftp"
33 / Sugarsync
/ "sugarsync"
34 / Tardigrade Decentralized Cloud Storage
/ "tardigrade"
35 / Transparently chunk/split large files
/ "chunker"
36 / Union merges the contents of several upstream fs
/ "union"
37 / Webdav
/ "webdav"
38 / Yandex Disk
/ "yandex"
39 / Zoho
/ "zoho"
40 / http Connection
/ "http"
41 / premiumize.me
/ "premiumizeme"
42 / seafile
/ "seafile"
直接輸入序號,比如我掛載的是 OneDrive 就可以輸入 26 ,
client_id 可以直接回車默認,
client_secret 也可以直接回車默認,
然后會出現 OneDrive 區域選擇,如下:
Choose national cloud region for OneDrive.
Enter a string value. Press Enter for the default ("global").
Choose a number from below, or type in your own value
1 / Microsoft Cloud Global
/ "global"
2 / Microsoft Cloud for US Government
/ "us"
3 / Microsoft Cloud Germany
/ "de"
4 / Azure and Office 365 operated by 21Vianet in China
/ "cn"
可以直接輸入 1 選擇全球,
然后是選擇是否進行高級配置,如下:
dit advanced config? (y/n) y) Yes n) No (default)
可以輸入 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 (default) n) No
可以輸入 n ,
這里需要獲取授權碼:
For this to work, you will need rclone available on a machine that has a web browser available. For more help and alternate methods see: https://rclone.org/remote_setup/ Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "onedrive" Then paste the result below:
授權碼需要在本地電腦上獲取,訪問 https://rclone.org/downloads/ 根據你的電腦系統版本下載對應的 Rclone。
下載完成后解壓,進入存放 Rclone 的目錄,以 Win10 為例,打開 Powershell ,我的 Rclone 放在 E:/下載/rclone-v1.55.0-windows-amd64 ,我可以輸入:
cd E:/下載/rclone-v1.55.0-windows-amd64
在存放 Rclone 的目錄可以看到 rclone.exe 的可執行程序,輸入:
./rclone authorize "onedrive"
瀏覽器應該會自動打開,如果瀏覽器沒有打開可以根據提示復制地址訪問。如果瀏覽器登錄了 OneDrive 的話會直接顯示授權確認信息,如果沒有登錄的話會彈出登錄頁面,登錄 OneDrive 后也會顯示授權確認信息,如下:

選擇 接受 后在本地命令行會顯示一串 JSON 格式的授權信息,復制授權信息包括首尾的 {} ,到 Linux 終端粘貼。
然后是選擇 OneDrive 的類型,如下:
Choose a number from below, or type in an existing value 1 / OneDrive Personal or Business / "onedrive" 2 / Root Sharepoint site / "sharepoint" 3 / Sharepoint site name or URL (e.g. mysite or https://contoso.sharepoint.com/sites/mysite) / "url" 4 / Search for a Sharepoint site / "search" 5 / Type in driveID (advanced) / "driveid" 6 / Type in SiteID (advanced) / "siteid" 7 / Sharepoint server-relative path (advanced, e.g. /teams/hr) / "path"
可以輸入 1 ,
然后會顯示找到的 OneDrive 賬戶,如下:
Found 1 drives, please select the one you want to use: 0: OneDrive (business) id=b!b_xnJJqyBMSVPjgvhvbP8XmJ_M_dMjhzrbhnaWknnbKqNBm8MTqM3kvEtW67P
根據提示輸入序號,
這里會根據你輸入的序號查找賬戶,如下:
Found drive 'root' of type 'business', URL: https://xxx-my.sharepoint.com/personal/changbin_xxx_onmicrosoft_com/Documents Is that okay? y) Yes (default) n) No
確認無誤后輸入 y ,
接著會顯示你選擇的配置信息,確認無誤后輸入 y 保存配置。
掛載
輸入:
rclone mount configName:OneDriveLocation dir --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
其中的 configName 就是配置名稱,OneDriveLocation 就是要掛載的 OneDrive 目錄,dir 就是要掛載到的本地目錄。
例如我要把一個名為 OneDrive 的配置掛載到本地的 /OneDrive 目錄,我可以這樣寫:
rclone mount OneDrive:/ /OneDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
我這里掛載的是整個 OneDrive 網盤,所以我寫的是 OneDrive 的根目錄 / 。
掛載完成后不會顯示任何內容,可以再開一個終端,輸入 df -h 查看磁盤空間,如下:
Filesystem Size Used Avail Use% Mounted on devtmpfs 1.5G 0 1.5G 0% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm tmpfs 1.5G 153M 1.4G 11% /run tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup /dev/vda1 57G 26G 29G 48% / tmpfs 301M 0 301M 0% /run/user/0 OneDrive 5.0T 1.1T 4.0T 21% /OneDrive
掛載完成后進入掛載的目錄就可以看到 OneDrive 的文件了,上傳文件可以直接拷貝到掛載目錄,下載也是直接拷貝到本地目錄。
掛載出錯
如果在掛載的時候出現了類似下面的提示:
2021/03/04 18:58:16 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH
需要安裝 fuse。
CentOS/Fedora 安裝 fuse:
yum install -y fuse
Ubuntu/Debian 安裝 fuse:
apt install -y fuse
搬瓦工優惠/性價比套餐推薦
下面表格整理了更多的搬瓦工優惠套餐。
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
|---|---|---|---|---|---|---|---|---|
| CN2 (最便宜) |
1GB | 1核 | 20GB | 1TB | 1Gbps | DC3 CN2 DC8 ZNET |
$49.99/年 | 購買 |
| CN2 | 2GB | 1核 | 40GB | 2TB | 1Gbps | $52.99/半年 $99.99/年 |
購買 | |
| CN2 GIA-E (最推薦) |
1GB | 2核 | 20GB | 1TB | 2.5Gbps | DC6 CN2 GIA-E DC9 CN2 GIA 日本軟銀 JPOS_1 聯通荷蘭 EUNL_9 |
$49.99/季度 $169.99/年 |
購買 |
| CN2 GIA-E | 2GB | 3核 | 40GB | 2TB | 2.5Gbps | $89.99/季度 $299.99/年 |
購買 | |
| HK | 2GB | 2核 | 40GB | 0.5TB | 1Gbps | 香港 CN2 GIA | $89.99/月 $899.99/年 |
購買 |
| HK | 4GB | 4核 | 80GB | 1TB | 1Gbps | $155.99/月 $1559.99/年 |
購買 |
選擇建議:
- 入門:洛杉磯 CN2 套餐,目前最便宜,可選 CN2 GT 機房,入門之選。
- 推薦:洛杉磯 CN2 GIA-E 套餐,價格適中,速度超快,可選機房多,性價比最高。
- 高端:香港 CN2 GIA 套餐,價格較高,但是無可挑剔。
搬瓦工高速機房線路排序
下面是搬瓦工高速機房線路最新速度排序,是電信線路擴容之后根據最新的測速結果進行排序的,最快的自然是中國香港 CN2 GIA 機房,然后是日本大阪軟銀機房,其次就是美國 CN2 GIA 兩個機房,以及 CN2 GT 機房等。此外,中國
- 中國香港 CN2 GIA
- 日本軟銀 JPOS_1
- 美國洛杉磯 DC6 CN2 GIA-E ≈ 美國洛杉磯 DC9 CN2 GIA
- 聯通荷蘭 EUNL_9
- 美國洛杉磯 DC3 CN2
- 美國洛杉磯 DC8 ZNET ≈ 美國洛杉磯 DC4 MCOM ≈ 美國洛杉磯 DC2 QNET ≈ 美國弗里蒙特
- 美國新澤西 ≈ 美國紐約 ≈ 荷蘭阿姆斯特丹
Bandwagonhost最新可購買方案
此表格為最新更新版,最后更新于2021-05-14. 所有方案是否可遷移已標出。
備注:內存 1GB = 1024MB,流量 1TB = 1000GB,硬盤均為 SSD。
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
|---|---|---|---|---|---|---|---|---|
| CN2 常規方案 | ||||||||
| CN2 (最便宜) |
1GB | 1核 | 20GB | 1TB | 1Gbps | DC3 CN2 DC8 ZNET DC2 QNET DC4 MCOM 美國弗里蒙特 美國新澤西 美國紐約 荷蘭阿姆斯特丹 |
$49.99/年 | 購買 |
| CN2 | 2GB | 1核 | 40GB | 2TB | 1Gbps | $52.99/半年 $99.99/年 |
購買 | |
| CN2 | 4GB | 2核 | 80GB | 3TB | 1Gbps | $59.99/季度 $199.99/年 |
購買 | |
| CN2 | 8GB | 2核 | 160GB | 5TB | 1Gbps | $39.99/月 $399.99/年 |
購買 | |
| CN2 | 16GB | 3核 | 320GB | 8TB | 1Gbps | $79.99/月 $799.99/年 |
購買 | |
| CN2 HIBW1 | 16GB | 3核 | 320GB | 12TB | 1Gbps | $99.99/月 $999.99/年 |
購買 | |
| CN2 HIBW2 | 16GB | 3核 | 320GB | 16TB | 1Gbps | $129.99/月 $1299.99/年 |
購買 | |
| CN2 GIA ECOMMERCE 方案(DC6 CN2 GIA-E) | ||||||||
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
| CN2 GIA-E (最推薦) |
1GB | 2核 | 20GB | 1TB | 2.5Gbps | DC6 CN2 GIA-E DC9 CN2 GIA 日本軟銀 JPOS_1 聯通荷蘭 EUNL_9 DC3 CN2 DC8 ZNET DC2 QNET DC4 MCOM 美國弗里蒙特 美國新澤西 美國紐約 荷蘭阿姆斯特丹 |
$49.99/季度 $169.99/年 |
購買 |
| CN2 GIA-E | 2GB | 3核 | 40GB | 2TB | 2.5Gbps | $89.99/季度 $299.99/年 |
購買 | |
| CN2 GIA-E | 4GB | 4核 | 80GB | 3TB | 2.5Gbps | $56.99/月 $549.99/年 |
購買 | |
| CN2 GIA-E | 8GB | 6核 | 160GB | 5TB | 5Gbps | $86.99/月 $879.99/年 |
購買 | |
| CN2 GIA-E | 16GB | 8核 | 320GB | 8TB | 5Gbps | $159.99/月 $1599.99/年 |
購買 | |
| CN2 GIA-E | 32GB | 10核 | 640GB | 10TB | 10Gbps | $289.99/月 $2759.99/年 |
購買 | |
| CN2 GIA-E | 64GB | 12核 | 1280GB | 12TB | 10Gbps | $549.99/月 $5399.99/年 |
購買 | |
| HONG KONG CN2 GIA 香港方案 | ||||||||
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
| HK | 2GB | 2核 | 40GB | 0.5TB | 1Gbps | 香港 CN2 GIA | $89.99/月 $899.99/年 |
購買 |
| HK | 4GB | 4核 | 80GB | 1TB | 1Gbps | $155.99/月 $1559.99/年 |
購買 | |
| HK | 8GB | 6核 | 160GB | 2TB | 1Gbps | $299.99/月 $2999.99/年 |
購買 | |
| HK | 16GB | 8核 | 320GB | 4TB | 1Gbps | $589.99/月 $5899.99/年 |
購買 | |
| KVM 常規方案 | ||||||||
| 方案 | 內存 | CPU | 硬盤 | 流量/月 | 帶寬 | 機房 | 價格 | 購買 |
| KVM | 1GB | 2核 | 20GB | 1TB | 1Gbps | DC3 CN2 DC8 ZNET DC2 QNET DC4 MCOM 美國弗里蒙特 美國新澤西 美國紐約 荷蘭阿姆斯特丹 (DC3 機房流量為 1/3) |
$49.99/年 | 購買 |
| KVM | 2GB | 3核 | 40GB | 2TB | 1Gbps | $52.99/半年 $99.99/年 |
購買 | |
| KVM | 4GB | 4核 | 80GB | 3TB | 1Gbps | $19.99/月 $199.99/年 |
購買 | |
| KVM | 8GB | 5核 | 160GB | 4TB | 1Gbps | $39.99/月 $399.99/年 |
購買 | |
| KVM | 16GB | 6核 | 320GB | 5TB | 1Gbps | $79.99/月 $799.99/年 |
購買 | |
| KVM | 24GB | 7核 | 480GB | 6TB | 1Gbps | $119.99/月 $1199.99/年 |
購買 | |





















