
Business Intelligence as a Service
Try PlusClouds Eaglet service and find high quality B2B hot leads and opportunites with AI support.
MinIO is a high-performance object storage service released under the GNU Affero General Public License V3.0. If you are reading this article, most of you may have heard of or used the Amazon S3 storage service. We can say that the MinIO service has nearly the same functionalities as S3. By using MinIO, you can create your own S3 server at a lower cost.
Object storage takes every part of the data and redesigns it as an object. Unlike file storage and block storage, the data is stored in unique metadata sections assigned piece by piece in the storage pool.
In this article, we will use the Ubuntu 20.04 operating system.
4 Ubuntu 20.04 installed servers
Root access on all nodes
Stable internet connection on the nodes where installation will take place
The next steps must be done completely on all nodes.
1. Mount a New Disk Aside from the Disk Where the Operating System is Installed
Our essential requirement for MinIO cluster installation is to mount a new disk for the MinIO service aside from the disk where the operating system is installed.
We can list the disks connected to the machine with the following command.
fdisk -l
Disk /dev/xvda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2666C97D-884F-4535-8F56-5DCE785E1D25
Device Start End Sectors Size Type
/dev/xvda1 2048 4095 2048 1M BIOS boot
/dev/xvda2 4096 2101247 2097152 1G Linux filesystem
/dev/xvda3 2101248 167772126 165670879 79G Linux filesystem
Disk /dev/xvdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
You will encounter an output similar to the one above. Here, the /dev/xvda disk is the disk where our operating system is installed. The newly added disk appears as /dev/xvdb.
Before performing the mount operation for the new disk, we need to do a few more things.
First, create a physical area with the following command.
pvcreate /dev/xvdb
Immediately after, we create the directory where we will mount our disk.
mkdir /data
Then we create the file system of our new disk with the following command.
mkfs.ext4 /dev/xvdb
After creating the file system, we perform the last remaining step for the mount operation. We configure the disk and mount directory in the /etc/fstab file.
nano /etc/fstab
After reaching the file, we add the following line.
/dev/xvdb /data ext4 defaults,noatime,nofail 0 0
Our disk is now ready for the mount operation. We perform the mount operation with the following command.
mount -a
You can verify the mount operation with the following command.
df -h
Don't forget that we need to perform the same operation on all nodes.
2. Perform MinIO Service Installation
Prepare your operating system before service installation. You can carry out the operations with the following command.
apt update && apt upgrade && apt install wget -y
Then we download the MinIO service and give the required permissions.
wget -O /usr/local/bin/minio https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x /usr/local/bin/minio
We create and edit the service file for MinIO in the directory where our system services are located.
nano /lib/systemd/system/minio.service
Copy and paste the following lines and save.
[Unit]
Description =minio
Documentation =https://docs.min.io
Wants =network-online.target
After =network-online.target
AssertFileIsExecutable =/usr/local/bin/minio
[Service]
WorkingDirectory =/usr/local/
User =root
Group =root
EnvironmentFile =/etc/default/minio
ExecStart =/usr/local/bin/minio server $MINIO_OPTS \
--console-address ":9001"
Restart =always
LimitNOFILE =65536
TimeoutStopSec =infinity
SendSIGKILL = no
[Install]
WantedBy =multi-user.target
Then we create and edit our MinIO config file.
nano /etc/default/minio
Copy and paste the following lines. Don't forget to change the necessary places with your own information.
MINIO_OPTS= "http://hostname1:9000/data http://hostname2:9000/data http://hostname3:9000/data http://hostname4:9000/data "
MINIO_ACCESS_KEY= "A secure key that will serve as at least a 16 character user information"
MINIO_SECRET_KEY= "A console login password of at least 16 characters"
If you have performed the same operations on all nodes mentioned above, the only thing left is to run the MinIO service on each node individually.
systemctl daemon-reload systemctl enable minio systemctl start minio.service
And finally, you can verify that your cluster is running actively with the following command.
systemctl status minio.service
Your MinIO cluster is now ready for use. See you in another article :)
If you are a journalist, who has desire to dig deep in topics related to businesses and sectors, we want to work with you!
With the AutoQuill tool that PlusClouds has started to offer to its affiliate partners, content creators will be able to sell with a single click. Let us show you how you can get your share of this revolution.