RustFS
This program is getting a lot of attention because it’s iterating fast, supports erasure coding, and uses the Apache 2 license so you don’t have to worry about minio rug-pull shenanigans.
I used it for a month and like it - though when they say it’s alpha, they mean it. The devs fix bugs fast, but you will objects wont create, delete, etc for unknown reasons.
Setup
Setup a four-node cluster, each with two disks similar to https://docs.rustfs.com/installation/linux/multiple-node-multiple-disk.html
Ensure time services are running
# Make sure NTP service is active and stem clock synchronized
timedatectl status
System clock synchronized: yes
NTP service: active
Add entries to the hosts file for the other cluster members
172.31.1.1 shire1
172.31.1.2 shire2
172.31.1.3 shire3
172.31.1.4 shire4
And set up private addresses if desired
sudo vi /etc/network/interfaces
auto enp1s0f4
iface enp1s0f4 inet static
address 172.31.1.1
netmask 255.255.255.0
Prep and mount the disks (two of them in this example)
# Format the disks
sudo apt install -y xfsprogs
sudo mkfs.xfs -i size=512 -n ftype=1 -L RUSTFS0 /dev/sdc
sudo mkfs.xfs -i size=512 -n ftype=1 -L RUSTFS1 /dev/sdd
# Make the mountpoints
sudo mkdir -p /data/rustfs{0..1}
# Add to /etc/fstab
sudo tee -a /etc/fstab <<EOF
# RustFS Volumes
LABEL=RUSTFS0 /data/rustfs0 xfs defaults,noatime,nodiratime 0 0
LABEL=RUSTFS1 /data/rustfs1 xfs defaults,noatime,nodiratime 0 0
EOF
# And mount
sudo systemctl daemon-reload
sudo mount -a
Add the service user and own the mounts
sudo groupadd -r rustfs-user
sudo useradd -M -r -g rustfs-user rustfs-user
sudo chown rustfs-user:rustfs-user /data/rustfs*
Download and install the binary. I adjusted for the (possibly faster) GNU version over the (more compatible) MUSL
sudo apt install -y unzip
wget https://dl.rustfs.com/artifacts/rustfs/release/rustfs-linux-x86_64-gnu-latest.zip
unzip rustfs-linux-x86_64-gnu-latest.zip
chmod +x rustfs
sudo mv rustfs /usr/local/bin/
Create the config file, adjusted for two disks (0 and 1)
# Multiple node multiple disk mode
sudo tee /etc/default/rustfs <<EOF
RUSTFS_ACCESS_KEY=rustfsadmin
RUSTFS_SECRET_KEY=rustfsadmin
RUSTFS_VOLUMES="http://node{1...4}:9000/data/rustfs{0...1}"
RUSTFS_ADDRESS=":9000"
RUSTFS_CONSOLE_ENABLE=true
RUST_LOG=error
RUSTFS_OBS_LOG_DIRECTORY="/var/logs/rustfs/"
EOF
Adjust for whatever you named your hosts
sudo sed -i 's/node/shire/' /etc/default/rustfs
TODO - Rustfs wants to log to a new folder ’logs’. Let’s change that later
# Note: We already created the mount dirs above, but including here too as it's in the docs
sudo mkdir -p /data/rustfs{0..1} /var/logs/rustfs /opt/tls
sudo chmod -R 750 /data/rustfs* /var/logs/rustfs
Add a service unit
sudo tee /etc/systemd/system/rustfs.service <<EOF
[Unit]
Description=RustFS Object Storage Server
Documentation=https://rustfs.com/docs/
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
NotifyAccess=main
User=root
Group=root
WorkingDirectory=/usr/local
EnvironmentFile=-/etc/default/rustfs
ExecStart=/usr/local/bin/rustfs \$RUSTFS_VOLUMES
LimitNOFILE=1048576
LimitNPROC=32768
TasksMax=infinity
Restart=always
RestartSec=10s
OOMScoreAdjust=-1000
SendSIGKILL=no
TimeoutStartSec=30s
TimeoutStopSec=30s
NoNewPrivileges=true
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
RestrictRealtime=true
# service log configuration
StandardOutput=append:/var/logs/rustfs/rustfs.log
StandardError=append:/var/logs/rustfs/rustfs-err.log
[Install]
WantedBy=multi-user.target
EOF
Update for the dedicated service user
sudo sed -i 's/User=root/User=rustfs-user/' /etc/systemd/system/rustfs.service
sudo sed -i 's/Group=root/Group=rustfs-user/' /etc/systemd/system/rustfs.service
Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable --now rustfs
sudo systemctl status rustfs
# This seems to have an issue with perms
sudo tail -f /var/logs/rustfs/rustfs*.log
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.