> For the complete documentation index, see [llms.txt](https://docs.greennode.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.greennode.ai/vn/vstorage/object-storage/object-storage-hcm04/tinh-huong-su-dung-use-case/migrate-du-lieu-migrate-data/rclone-mount-vstorage-len-window-server.md).

# \[Rclone] Mount vStorage lên Window server

## 1. Tải và cài đặt **rclone** theo hướng dẫn sau:

* Bạn thực hiện tải Rclone qua link: <https://rclone.org/downloads/>.

## 2. Tạo file chứng thực rclone.conf theo mẫu sau:

Sau khi tải xuống và cài đặt Rclone, thực hiện tạo file rclone.conf tại thư mục `C:\Users\username\.config\rclone` với nội dung

```bash
[vstorage]
type = s3
provider = Other
access_key_id = <<Lấy thông tin từ vStorage Portal>>
secret_access_key = <<Lấy thông tin từ vStorage Portal>>
endpoint = https://hcm04.vstorage.vngcloud.vn
```

## 3. Thực hiện mount

* Tiếp theo, bạn có thể sử dụng Rclone với CMD hoặc PowerShell
  * Để list danh sách object trong một bucket, hãy sử dụng lệnh:

    ```
    C:\Users\stackops\Downloads\rclone.exe ls vstorage:[bucket_name]
    ```
  * Để upload một object lên bucket, hãy dùng lệnh:

    ```
    C:\Users\stackops\Downloads\rclone.exe copy [local_path] vstorage:[bucket_name]
    ```
  * Để mount một bucket trên vStorage thành local\_path, hãy chạy lệnh:

    ```
    C:\Users\stackops\Downloads\rclone.exe mount vstorage:[bucket_name] [local_path] --vfs-cache-mode off --allow-non-empty --allow-other --drive-chunk-size 128M  --max-read-ahead 200M --dir-cache-time 30m
    ```

**Lưu ý:**

* Nếu gặp lỗi thiếu gói winfsp như hình dưới, bạn có thể tải thêm gói tại link này <https://github.com/billziss-gh/winfsp/releases/tag/v1.4.19049>

<figure><img src="/files/1fsoKVuCGVFP21whOlFh" alt=""><figcaption></figcaption></figure>

* Bạn không cần phải tạo sẵn đường dẫn local\_path trên máy local khi tiến hành mount.
* Rclone không hỗ trợ mode chạy ngầm (background mode) nên bạn không được đóng cmd trong quá trình sử dụng.
