![](https://exfast.me/wp-content/uploads/2020/07/1593879299-f5fbe3838f97438baf2a367ef424dc81-1140x600.jpg) 近期搞到了 Synology Nas 來玩,但又苦於硬碟過小無法將 Google drive 的資料同步回 Nas,山不轉路轉想到了可以用 rclone 的功能來偷雞。 這裡就不贅述如何在 Nas 上安裝 Docker 的方法了,畢竟套件管理中心點一點就可以安裝完成的東西也沒有什麼好講的了吧 …? 由於本人對於 docker command 操作蠻熟的,所以操作 Docker 的步驟都使用 ssh 為主 1. 建立一個 ubuntu``` sudo -i docker run --rm -it ubuntu bash ``` 2. 下載 rclone 並安裝``` apt update -y apt install curl unzip -y curl [https://rclone.org/install.sh](https://rclone.org/install.sh) | bash ``` 3. 登入 Google drive 產生 config,並將 stdout 的設定儲存成 `rclone.conf` 後放在 Nas 上``` rclone config ``` 4. 離開 container 且將想要掛載的儲存空間設定為允許``` sudo mount --make-shared "/volume2" ``` 5. 接著就可以藉由別人封裝好的 image 來掛載資料夾囉``` docker run -d --name rclone-gd-mount --restart=always \\ --cap-add SYS\_ADMIN \\ --device /dev/fuse \\ --security-opt apparmor:unconfined \\ -e ConfigName="rclone.conf" \\ -e RemotePath="gd-mount:" \\ -e MountCommands="--allow-other --allow-non-empty --read-only --dir-cache-time 2h --buffer-size 32M --poll-interval 5m --tpslimit 2" \\ -v "/volume1/docker/rclone-gd-mount":/config \\ -v "/volume2/rclone-gd-mount":/mnt/mediaefs:shared \\ mumiehub/rclone-mount ``` 6. 大功告成 !! ![](https://exfast.me/wp-content/uploads/2020/07/1593879386-831c543c7e6fbf9b49df87fd8f272522.png) 參考資料: 1. [rclone mount on Synology NAS with Docker](https://bitbucket.org/fusebit/plex-and-google-drive/wiki/rclone%20mount%20on%20Synology%20NAS%20with%20Docker) 2. [\[筆記\]將Google Drive掛載到NAS上(用rclone)](https://ak77now.pixnet.net/blog/post/45722625) * * * [這裡的資訊對您有用嗎?歡迎斗內給我](https://cart.cashier.ecpay.com.tw/qp/fPM6)