Contents
  1. 1. MinIO & RustFS Local Setup Guide
    1. 1.1. MinIO(闭源了)
      1. 1.1.1. Install
      2. 1.1.2. Start Server
      3. 1.1.3. Configure Client
      4. 1.1.4. Stop Server
      5. 1.1.5. Basic Operations
      6. 1.1.6. On-Disk Storage Format
    2. 1.2. RustFS
      1. 1.2.1. Install
      2. 1.2.2. Start Server
      3. 1.2.3. Configure Client
      4. 1.2.4. Stop Server
      5. 1.2.5. Basic Operations (via mc)
      6. 1.2.6. Basic Operations (via boto3)
    3. 1.3. MinIO vs RustFS Comparison
    4. 1.4. Key Concept: S3 API is the Protocol

存储:MinIO(S3 协议)
表格式:Iceberg(解决小文件、事务、schema)
计算:Spark + Flink
查询:Trino
元数据:Hive Metastore
调度:Airflow 或 K8s
接入:Kafka(埋点日志)

MinIO & RustFS Local Setup Guide

MinIO(闭源了)

Install

1
2
3
4
5
# Download server & client
mkdir -p ~/minio-bin
wget -q https://dl.min.io/server/minio/release/linux-amd64/minio -O ~/minio-bin/minio
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc -O ~/minio-bin/mc
chmod +x ~/minio-bin/minio ~/minio-bin/mc

Start Server

1
2
3
4
5
mkdir -p ~/minio-data

MINIO_ROOT_USER=minioadmin \
MINIO_ROOT_PASSWORD=minioadmin \
~/minio-bin/minio server ~/minio-data --console-address ":9001" &
Item Value
API http://127.0.0.1:9000
Console http://127.0.0.1:9001
Credentials minioadmin / minioadmin
Data Dir ~/minio-data

Configure Client

1
~/minio-bin/mc alias set local http://127.0.0.1:9000 minioadmin minioadmin

Stop Server

1
2
3
mc admin service stop myminio

pkill -f "minio server"

Basic Operations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Bucket CRUD
mc mb local/my-bucket # create
mc ls local/ # list buckets
mc rb local/my-bucket --force # delete (with contents)

# Object CRUD
mc cp file.txt local/my-bucket/ # upload
mc cp local/my-bucket/file.txt ./ # download
mc ls local/my-bucket/ # list objects
mc rm local/my-bucket/file.txt # delete

# Management
mc du local/my-bucket # disk usage
mc stat local/my-bucket/file.txt # object metadata
mc admin info local # server info
mc version enable local/my-bucket # enable versioning
mc quota set local/my-bucket --size 1GiB # set quota
mc anonymous set download local/my-bucket # public read
mc ilm rule add local/my-bucket --expire-days 30 # lifecycle

On-Disk Storage Format

MinIO does not store files as plain Linux files. The structure is:

1
2
3
4
5
6
7
~/minio-data/
├── .minio.sys/ # system metadata (config, IAM, trash, usage)
└── <bucket>/
└── <object-path>/
├── xl.meta # object metadata
└── <version-uuid>/
└── part.1 # actual data chunk
  • Do not edit files directly on disk - use S3 API or mc
  • Backup should use mc mirror or S3 replication, not filesystem snapshots

RustFS

Install

1
2
3
4
5
# Download and extract
mkdir -p ~/rustfs-bin
wget -q https://github.com/rustfs/rustfs/releases/download/1.0.0-beta.3/rustfs-linux-x86_64-gnu-latest.zip -O /tmp/rustfs.zip
unzip -o /tmp/rustfs.zip -d ~/rustfs-bin/
chmod +x ~/rustfs-bin/rustfs

Start Server

1
2
3
4
5
6
7
8
9
10
11
mkdir -p ~/rustfs-data/rustfs{0,1,2,3}

RUSTFS_ACCESS_KEY=rustfsadmin \
RUSTFS_SECRET_KEY=rustfsadmin \
RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true \
~/rustfs-bin/rustfs server \
~/rustfs-data/rustfs0 \
~/rustfs-data/rustfs1 \
~/rustfs-data/rustfs2 \
~/rustfs-data/rustfs3 \
--console-address ":9001" &

RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true is required for local testing because
all volume directories reside on the same physical disk. RustFS enforces
distinct physical disks for erasure coding in production.

Item Value
API http://127.0.0.1:9000
Console http://127.0.0.1:9001
Credentials rustfsadmin / rustfsadmin
Data Volumes 4 drives, erasure coding EC:2

Configure Client

RustFS is 100% S3 compatible. Any S3 client works:

1
2
3
4
5
# Using mc (MinIO Client - generic S3 client)
~/minio-bin/mc alias set rustfs http://127.0.0.1:9000 rustfsadmin rustfsadmin

# Using boto3 (Python S3 SDK)
pip3 install boto3

Stop Server

1
pkill -f rustfs

Basic Operations (via mc)

1
2
3
4
5
6
mc mb rustfs/my-bucket
mc cp file.txt rustfs/my-bucket/
mc ls rustfs/my-bucket/
mc cp rustfs/my-bucket/file.txt ./
mc rm rustfs/my-bucket/file.txt
mc admin info rustfs

Basic Operations (via boto3)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import boto3
from botocore.client import Config

s3 = boto3.client(
"s3",
endpoint_url="http://127.0.0.1:9000",
aws_access_key_id="rustfsadmin",
aws_secret_access_key="rustfsadmin",
config=Config(signature_version="s3v4"),
region_name="us-east-1",
)

s3.create_bucket(Bucket="my-bucket")
s3.put_object(Bucket="my-bucket", Key="hello.txt", Body=b"Hello!")
body = s3.get_object(Bucket="my-bucket", Key="hello.txt")["Body"].read()
s3.delete_object(Bucket="my-bucket", Key="hello.txt")

MinIO vs RustFS Comparison

Aspect MinIO RustFS
Language Go Rust
License AGPL v3 (restrictive) Apache 2.0 (business-friendly)
S3 Compatibility Full Full
Maturity Production-stable Beta
Erasure Coding Single mode: EC:0 4 drives: EC:2
Telemetry Has analytics None
4KB Object Perf Baseline Claimed 2.3x faster
Console Port 9001 9001
API Port 9000 9000
Health Check /minio/health/live /health

Key Concept: S3 API is the Protocol

1
2
3
4
5
6
7
┌─────────────┐     S3 Protocol      ┌──────────────┐
│ Any Client │ ──────────────────► │ Any Server │
│ (mc, boto3,│ (HTTP + AWS │ (RustFS, │
│ aws cli, │ Signature V4) │ MinIO, │
│ s3cmd, │ │ Ceph, etc.)│
│ rclone) │ │ │
└─────────────┘ └──────────────┘

mc is just one of many S3 clients. It is a generic S3 client that works with
any S3-compatible server, not just MinIO. RustFS has no code-level relationship
with MinIO - they both simply implement the same S3 API specification.