Hard Drive Failures
RustFS ensures read/write access can still be provided when some disks fail through mechanisms similar to erasure coding, and automatically heals data after replacing disks.
RustFS ensures read/write access can still be provided when some disks fail through mechanisms similar to erasure coding, and automatically heals data after replacing disks.
Table of Contents
- Unmount Failed Disk
- Replace Failed Disk
- Update
/etc/fstabor RustFS Configuration - Remount New Disk
- Trigger and Monitor Data Healing
- Follow-up Checks and Notes
Unmount Failed Disk
Before replacing the physical hard drive, you need to safely unmount the failed disk from the operating system level to avoid I/O errors in the file system or RustFS during the replacement process.
sudo umount /data/rustfs0Notes
- If there are multiple mount points, execute
umountseparately. - If encountering "device is busy", you can first stop the RustFS service:
sudo systemctl stop rustfsReplace Failed Disk
After physically replacing the failed disk, you need to partition and format the new disk, and apply the same label as the original disk.
sudo mkfs.xfs -f -i size=512 -n ftype=1 -L RUSTFS0 /dev/sdbRequirements
- New disk capacity ≥ original disk capacity;
- File system type consistent with other disks (XFS, per the installation guide);
- Recommend using labels (LABEL) or UUID for mounting to ensure disk order is not affected by system restarts.
Update /etc/fstab or RustFS Configuration
Confirm that the mount item labels or UUIDs in /etc/fstab point to the new disk. The mount point must stay identical to the one listed in RUSTFS_VOLUMES (in /etc/default/rustfs), so the healed disk rejoins the cluster at the same path.
UUID=<filesystem-uuid> /data/rustfs0 xfs defaults,noatime,nodiratime 0 0Tips
- If using UUID:
sudo blkid -s UUID -o value /dev/sdb- After modifying fstab, be sure to validate syntax:
sudo mount -a
findmnt /data/rustfs0Remount New Disk
Execute the following commands to batch mount all disks and start the RustFS service:
sudo systemctl start rustfsConfirm all disks are mounted normally:
df -hT /data/rustfs0If some mounts fail, please check if fstab entries are consistent with disk labels/UUIDs.
Trigger and Monitor Data Healing
Once RustFS detects a freshly formatted disk at a known mount point, its background scanner heals the missing data onto it automatically — no manual command is required. Confirm that recovery has started and track its progress through the service logs:
journalctl -u rustfs -f
tail -f /var/log/rustfs/rustfs.logYou can also open the RustFS Console and check the disk status of the affected node.
Notes
- The healing process will complete in the background, usually with minimal impact on online access;
- After healing is complete, the tool will report success or list failed objects.
Follow-up Checks and Notes
- Performance Monitoring
- I/O may fluctuate slightly during healing, recommend monitoring disk and network load.
- Batch Failures
- If multiple failures occur in the same batch of disks, consider more frequent hardware inspections.
- Regular Drills
- Regularly simulate disk failure drills to ensure team familiarity with recovery processes.
- Maintenance Windows
- When failure rates are high, arrange dedicated maintenance windows to speed up replacement and healing.
Troubleshooting
Diagnose and resolve RustFS issues.
Node Failures
Complete steps for handling node failures in RustFS clusters. Mainly includes: replacement node hardware preparation, configuration updates, service deployment, rejoining the cluster, data healing, and subsequent checks and best practices.