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
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
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:
minio01: 10.129.17.224
minio02: 10.129.17.227
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 http://10.129.17.227/opt/storage01 http://10.129.17.227/opt/storage02 http://10.129.17.224/opt/storage01 http://10.129.17.224/opt/storage02
It automatically detects if a server is up or down, and automatically syncs data between nodes.