Cloud Native 15 min read

How to Build a MinIO Test Environment on VirtualBox: Step‑by‑Step Guide

This tutorial walks you through creating a minimal Linux VM in VirtualBox, adding four virtual disks, formatting and mounting them, and then installing and configuring MinIO in a single‑node multi‑drive setup using systemd, complete with verification commands and screenshots.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Build a MinIO Test Environment on VirtualBox: Step‑by‑Step Guide

1. Prepare the Experiment Environment

Use Oracle VM VirtualBox to create a minimal Linux VM and attach four virtual disks that will serve as MinIO drives. The virtual machine screenshot is shown below.

To add the disks:

Open Settings → Storage and click the + button to add a new SATA disk.

Click Create and define the size of each disk.

After creating all four disks, reboot the VM.

Verify that the OS detects the disks with:

[root@localhost ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0  50G  0 disk
├─sda1        8:1    0   1G  0 part /boot
└─sda2        8:2    0  49G  0 part
  ├─centos-root 253:0 0 45.1G 0 lvm /
  └─centos-swap 253:1 0 3.9G 0 lvm [SWAP]
sdb           8:16   0  10G  0 disk
sdc           8:32   0  10G  0 disk
sdd           8:48   0  10G  0 disk
sde           8:64   0  10G  0 disk
sr0          11:0    1 1024M 0 rom

The four new disks (sdb‑sde) appear without mount points. df -h does not list them, but fdisk -l confirms their presence.

Next, create a partition, format each disk (ext4 in this example), and mount them:

# Partition sdb
fdisk /dev/sdb
# (use default options to create a primary partition covering the whole disk)
# Write changes
w
# Format
mkfs.ext4 /dev/sdb
# Mount point
mkdir /data1
mount -t ext4 /dev/sdb /data1
# Verify
df -h

Repeat the same steps for /dev/sdc, /dev/sdd, and /dev/sde, mounting them to /data2, /data3, and /data4 respectively. After mounting, df -h shows all four disks correctly attached.

2. Deploy MinIO

MinIO offers three deployment architectures:

Single‑Node Single‑Drive (SNSD)

Single‑Node Multi‑Drive (SNMD) – a pseudo‑distributed mode with erasure coding.

Multi‑Node Multi‑Drive (MNMD) – true distributed deployment, recommended for production.

For this test, the SNMD architecture is used.

2.1 Installation Prerequisites

MinIO performs best on directly attached JBOD arrays formatted with XFS; ext4, Btrfs, or ZFS may reduce performance. All drives should be of the same type and capacity.

2.2 Step‑by‑Step Installation

Download and install the RPM package (adjust URL for your OS/CPU):

wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20230313194617.0.0.x86_64.rpm -O minio.rpm
sudo dnf install minio.rpm

Create the systemd service file (if not generated automatically):

[Unit]
Description=MinIO
Documentation=https://min.io/docs/minio/linux/index.html
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local
User=minio-user
Group=minio-user
ProtectProc=invisible
EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
Restart=always
LimitNOFILE=65536
TasksMax=infinity
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

Create the minio‑user and assign ownership to the data directories :

groupadd -r minio-user
useradd -M -r -g minio-user minio-user
chown minio-user:minio-user /data1 /data2 /data3 /data4

Configure environment variables in /etc/default/minio (example minimal config):

# Root credentials (change from defaults)
MINIO_ROOT_USER=myminioadmin
MINIO_ROOT_PASSWORD=minio-secret-key-change-me

# Define the four data drives using expansion notation
MINIO_VOLUMES="/data{1...4}"

Start and verify MinIO :

systemctl start minio.service
systemctl status minio.service

The service should show Active: running . Open the console URL shown in the status output, then log in with the root credentials defined above.

After logging in, you can create buckets and upload files via the web console, confirming that MinIO is operational.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DeploymentLinuxstorageMinioObject StorageSystemdVirtualBox
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.