This script balances data across Unraid disks by moving directories from overfilled disks to underfilled ones using rsync. It ensures all drives participate in balancing while maintaining a minimum move size of 1GB.
- Automatic Disk Balancing: Moves large directories first, followed by smaller refinements.
- Uses Rsync for Reliability: Supports
--dry-runmode by default. - Database Caching: Avoids unnecessary rescans with
shares.dbanddirs.db.- the initial run will scan shares & directories, but any subsequent run(s) will default to using cached information.
- Progress Reporting: Displays planned moves and disk usage before/after adjustments.
- pip install rich psutil
python rebalance.py [--execute] [--rescan]
--execute: Perform actual moves (defaults to displaying proposed moves).
--rescan: Rescan disk usage instead of using cached data.