先来份搭建教程~~

安装前两台时区时间同步一下,保持一致
我的环境:debain12 未开启防火墙

安装必要的工具依赖 unzip/netstat tool

apt install upzip net-tools

下载rustfs并安装至/usr/local/bin/

wget https://dl.rustfs.com/artifacts/rustfs/release/rustfs-linux-x86_64-musl-latest.zipunzip rustfs-linux-x86_64-musl-latest.zipchmod +x rustfsmv rustfs /usr/local/bin/

单机模式 hostname修改

vi /etc/hosts
127.0.0.1 node1

单机模式 配置文件

tee /etc/default/rustfs <<EOFRUSTFS_ACCESS_KEY=adminRUSTFS_SECRET_KEY=youPWDRUSTFS_VOLUMES="/data/rustfs0"RUSTFS_ADDRESS=":9000"RUSTFS_CONSOLE_ENABLE=trueRUST_LOG=errorRUSTFS_OBS_LOG_DIRECTORY="/var/logs/rustfs/"EOF

创建存储目录 创建相关目录

mkdir -p /data/rustfs0 /var/logs/rustfs /opt/tlschmod -R 750 /data/rustfs* /var/logs/rustfschown -R root:root /data/rustfs0chmod 755 /data/rustfs0mkdir -p /var/logs/rustfs

创建服务

我为了方便测试使用了root用户,为了安全你应该创建独立用户给rustfs

tee /etc/systemd/system/rustfs.service <<EOF[Unit]Description=RustFS Object Storage ServerDocumentation=https://rustfs.com/docs/After=network-online.targetWants=network-online.target[Service]Type=notifyNotifyAccess=mainUser=rootGroup=rootWorkingDirectory=/usr/localEnvironmentFile=-/etc/default/rustfsExecStart=/usr/local/bin/rustfs \$RUSTFS_VOLUMESLimitNOFILE=1048576LimitNPROC=32768TasksMax=infinityRestart=alwaysRestartSec=10sOOMScoreAdjust=-1000SendSIGKILL=noTimeoutStartSec=30sTimeoutStopSec=30sNoNewPrivileges=true ProtectHome=truePrivateTmp=truePrivateDevices=trueProtectClock=trueProtectKernelTunables=trueProtectKernelModules=trueProtectControlGroups=trueRestrictSUIDSGID=trueRestrictRealtime=true# service log configurationStandardOutput=append:/var/logs/rustfs/rustfs.logStandardError=append:/var/logs/rustfs/rustfs-err.log[Install]WantedBy=multi-user.targetEOF

重载服务

systemctl daemon-reload

开机自启并启动

systemctl enable --now rustfs

查看状态、端口、日志

systemctl status rustfs
netstat -ntpl
tail -f /var/logs/rustfs/rustfs*.log


多机模式我使用了最小2节点搭建测试,两节点只有一个raid0磁盘
/data/rustfs0为我的存储路径 可自行修改

多机单盘模式 hostname修改

vi /etc/hosts

51.255.111.111 node151.255.111.112 node2

多机模式 服务

tee /etc/default/rustfs <<EOFRUSTFS_ACCESS_KEY=adminRUSTFS_SECRET_KEY=youPWDRUSTFS_VOLUMES="http://node{1...2}:9000/data/rustfs0"RUSTFS_ADDRESS=":9000"RUSTFS_CONSOLE_ENABLE=trueRUST_LOG=errorRUSTFS_OBS_LOG_DIRECTORY="/var/logs/rustfs/"EOF

mkdir -p /data/rustfs0 /var/logs/rustfs /opt/tls
chmod -R 750 /data/rustfs* /var/logs/rustfs

创建服务

sudo tee /etc/systemd/system/rustfs.service <<EOF[Unit]Description=RustFS Object Storage ServerDocumentation=https://rustfs.com/docs/After=network-online.targetWants=network-online.target[Service]Type=notifyNotifyAccess=mainUser=rootGroup=rootWorkingDirectory=/usr/localEnvironmentFile=-/etc/default/rustfsExecStart=/usr/local/bin/rustfs \$RUSTFS_VOLUMESLimitNOFILE=1048576LimitNPROC=32768TasksMax=infinityRestart=alwaysRestartSec=10sOOMScoreAdjust=-1000SendSIGKILL=noTimeoutStartSec=30sTimeoutStopSec=30sNoNewPrivileges=trueProtectHome=truePrivateTmp=truePrivateDevices=trueProtectClock=trueProtectKernelTunables=trueProtectKernelModules=trueProtectControlGroups=trueRestrictSUIDSGID=trueRestrictRealtime=true# service log configurationStandardOutput=append:/var/logs/rustfs/rustfs.logStandardError=append:/var/logs/rustfs/rustfs-err.log[Install]WantedBy=multi-user.targetEOF

重载服务

systemctl daemon-reload

开机自启并启动

systemctl enable --now rustfs

查看状态、端口、日志

systemctl status rustfs
netstat -ntpl
tail -f /var/logs/rustfs/rustfs*.log

搭建好

http://ip:9001/ 进入web ui控制台进行管理

感受

rustfs 使用过程中就遇到第一个bug,空目录不能删除。该bug通过github issue 确认存在
第二个问题 我上面的2节点单磁盘时,一个节点彻底down后,控制台无法登录(这是正常的现象),但我重建第二台环境时 一直无法启动(can not get formats),按照官文文档操作 https://docs.rustfs.com.cn/troubleshooting/node.html ,官网教程中提供了rc工具简单的使用教程,但是这个rc工具没上线!!!最后无法解决 数据丢失 。 还好只是测试环境。。。

现在当正式环境 还是太早,观望观望 稳定再说了...

部署并配置 RustFS 服务下载与安装 按照 RustFS 官方相同版本部署流程,下载与现有节点一致的二进制或安装包,并解压到统一目录。确保启动脚本、环境变量及配置文件(如 /etc/default/rustfs)与集群中其他节点完全一致。配置校验核对 config.yaml 中的集群节点列表(endpoints)是否包含新节点的主机名与端口。确保所有节点的访问密钥和权限配置相同,以避免因认证失败导致的新节点无法加入。4) 重新加入集群并触发数据愈合启动服务systemctl start rustfs-server

minio社区版停止维护 长远考虑已转ceph...