Bart Simons

object storage

A 1 post collection

Mirrored object storage with Minio

 •  Filed under mirrored, distributed, object storage, minio

Object storage is on the rise - and that's not without a reason. When you have to deal with large pieces of data, it is very necessary to keep your data organised. Minio offers a perfectly fitted solution that is open source and well documented: it's an Amazon S3 compatible object storage server written in Go. Want to learn more about the project? This is their homepage.

Setting up a single node is a piece of cake, as I shall demonstrate.

# Create a directory for storing 'objects'
mkdir ~/ObjectStorage

# Download and prepare the Minio mode
chmod +x minio  
export MINIO_ACCESS_KEY=yourusernamegoeshere  
export MINIO_SECRET_KEY=yourpasswordgoeshere

# Run the Minio node
./minio server ~/ObjectStorage

It's that easy! You can now access your Minio node at port 9000, try it out in your browser.

Running a clustered of two nodes is also very easy. Let's say that we have two servers in a subnet:


We also have two disks on each server, so that means we also have the following folders mounted to their own disk:

/opt/storage01: disk 1
/opt/storage02: disk 2

Run the following command on both servers to initialise the cluster:

MINIO_ACCESS_KEY=yourusernamegoeshere MINIO_SECRET_KEY=yourpasswordgoeshere ./minio server  

It automatically detects if a server is up or down, and automatically syncs data between nodes.