Updated Volume Management (markdown)

Chris Lu 2020-04-09 00:00:09 -07:00
parent 52ed46546c
commit a87fb430c2

@ -3,6 +3,25 @@ When running large clusters, it is common to add more volume severs, or some vol
## Optimize volumes
See [[Optimization]] page on how to optimize for concurrent writes and concurrent reads.
## Configure volume management scripts
Run `weed scaffold -config=master` will generate `master.toml` which has sections as these.
```
[master.maintenance]
# periodically run these scripts are the same as running them from 'weed shell'
scripts = """
ec.encode -fullPercent=95 -quietFor=1h
ec.rebuild -force
ec.balance -force
volume.balance -force
volume.fix.replication
"""
sleep_minutes = 17 # sleep minutes between each script execution
```
If the `master.toml` has the above configuration, the scripts will run every 17 minutes. It has the same effect as running from `weed shell` directly. However, be sure to avoid running both at the same time. Currently there are no global locking to ensure one cluster level volume management is running.
## Fix missing volumes
When running large clusters, it is common that some volume servers are down. If a volume is replicated and one replica is missing, the volume will be marked as readonly.