From a87fb430c24417721de3b2e84daf34828b6bac2c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 9 Apr 2020 00:00:09 -0700 Subject: [PATCH] Updated Volume Management (markdown) --- Volume-Management.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Volume-Management.md b/Volume-Management.md index 6cccaf4..c7f9044 100644 --- a/Volume-Management.md +++ b/Volume-Management.md @@ -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.