From 8041313b5b2eee6943cc49d85b81bf32fd8e69d0 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 7 May 2019 09:14:03 -0700 Subject: [PATCH] Updated Volume Management (markdown) --- Volume-Management.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Volume-Management.md b/Volume-Management.md index 790645d..cc3caf2 100644 --- a/Volume-Management.md +++ b/Volume-Management.md @@ -1,7 +1,7 @@ When running large clusters, it is common to add more volume severs, or some volume servers are down, or some volume servers are replaced. These topology changes can cause missing volume replicas, or unbalanced number of volumes on volume servers. ## Optimize volumes -See [Optimization] page on how to optimize for concurrent writes and concurrent reads. +See [[Optimization]] page on how to optimize for concurrent writes and concurrent reads. ## 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. @@ -23,10 +23,6 @@ The balancing plan will try to evenly spread the number of writable and readonly balanceWritableVolumes() balanceReadOnlyVolumes() } - for all volumes { - balanceWritableVolumes() - balanceReadOnlyVolumes() - } } func balanceWritableVolumes(){ @@ -35,7 +31,7 @@ The balancing plan will try to evenly spread the number of writable and readonly sort all volume servers ordered by the number of local writable volumes pick the volume server A with the lowest number of writable volumes x pick the volume server B with the highest number of writable volumes y - if y > idealWritableVolumes and x +1 <= idealWritableVolumes { + if y > idealWritableVolumes and x+1 <= idealWritableVolumes { if B has a writable volume id v that A does not have { move writable volume v from A to B }