> 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-han02/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

Để thực hiện Mount vStorage thành Local Drive trên Window sử dụng Rclone, hãy làm theo hướng dẫn sau:

## 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://han02.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="https://3672463924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB0NrrrdJdpYOYzRkbWp5%2Fuploads%2Fri7QHUdE2m7u1cir9Gas%2Fimage.png?alt=media&amp;token=1a575152-a282-45c0-b995-bda5c259f13c" 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.
