見出し画像

Using Object Storage as Drive in Windows

Recently my server run out of space, so I need to add additional storage to my server. Since my server is Windows so the easiest way to change my server plan to the bigger one, but if I change the plan, it also add the CPU and RAM which is I don't really need it. So this is how I 'trick' it.

  1. Register a new object storage that support S3, and create a bucket in the object storage.

  2. Install WinFSP from this site, this app add extra library to windows that can support other filesystem.

  3. After  that you install rclone from this site, choose the correct version of your Operating System.

  4. Add new file named rclone.conf to this directory c:\Users\Administrator\.config\rclone  (change the Administrator with the username in your system)

  5. Edit rclone.conf file like this 

[remote-config]
type = s3
provider = Other
access_key_id = 1234
secret_access_key = 4321
endpoint = your_end_point

Test the rclone already working or not. 

.\rclone.exe lsd remote-config:

if you see your bucket, then rclone already worked.

and then, you can try to mount the Object Storage to be a drive, by type this command

.\rclone.exe mount remote-config:test-bucket E: --vfs-cache-mode full --dir-cache-time 1m0s

Make sure, you see the E drive in the Windows explorer.

In order to make it permanent (if the server restart), you can set rclone to be Windows service by using this NSSM, download and extract it. When you ready from the PowerSheel window, you can type this

.\nssm.exe install


You will see the window like this.

Fill the path with the rclone binary file (.exe), and argument with 
mount remote-config:test-bucket E: --vfs-cache-mode full --dir-cache-time 1m0s

And set the Service name, with the name you like, and then press Install service button.

Set the service autostart, in services.msc, make sure the user is Administrator for the service to start.


この記事が気に入ったらサポートをしてみませんか?