Mounting your OVH Object Storage Bucket as a File System

Photos via Pexels


In my previous articles, i have explained how to mount the Object Storage Bucket as a File System on Flexible Engine’s ECS Instances.

In this article, i will be using the s3fs-fuse project along with the Swift S3 API to mount OVH Object storage bucket on an OVH instance.

What is Object Storage

Object Storage allows you to store a large amount of unstructured data in a highly scalable manner using REST APIs.

The benefits behind using such service are :

Durability : data is kept safe on the cloud.

Availability : data is available and accessible remotely through REST APIs.

Scalability : such service is meant to store large amount of data.

Security : data can be encrypted when stored and while it is in transit.

Object Storage Use Cases :

Setting up the Swift S3 API

First, you need to get your file from your OVH platform. Then, you need to install the aws client :

sudo apt-get update 
sudo apt-get upgrade
pip3 install awscli awscli-plugin-endpoint
sudo apt-get install awscli

Next, you need to configure the aws client :

sudo mkdir .awsnano .aws/config

Based on the configuration described in the file , add the following lines in the config file :

[plugins]endpoint = awscli_plugin_endpoint[profile default]aws_access_key_id = put-here-access-keyaws_secret_access_key = put-here-secret-keyregion = gra (put-here-your-region, gra is just an example)s3 =endpoint_url = = s3v4addressing_style = virtuals3api =endpoint_url =

Once done, you can :

aws --profile default s3 ls
aws --profile default s3 mb s3://bucket

Note : S3 no longer supports creating bucket names that contain uppercase letters or underscores.

cd .awsnano file.textaws --profile default s3 cp file.txt s3://bucket/file.txt
aws --profile default s3 cp s3://bucket/file.txt file.txt
aws --profile default s3 rm s3://bucket/file.txt
aws --profile default s3 rb s3://bucket

Now, in order to mount the created OVH bucket as a file system, follow the steps described in my previous article : s3fs-fuse project.

For the url , make sure to use that we’ve configured previously for the aws client. (as described before, replace grawith your corresponding region).

References :

Getting started with the Swift S3 API

OVHcloud Object Storage clusters support S3 API

Use S3QL to mount object storage containers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store