Updated Volume Management (markdown)

Chris Lu 2019-05-07 09:14:03 -07:00
parent 41bef1812b
commit 8041313b5b

@ -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
}