adding replication or reducing size of cluster without data loss
I have a cluster of 10 servers and I want to reduce it to 5 while I move 5 of them to a different rack which will involve re-IPing the servers etc.
What I'd like to do is one by one remove a server and then rebalance.
However The buckets against this cluster were set up without replication so..
Is it possible to do this without losing data?
If not is it possible to add replication to a bucket after it has been set up?
The servers are specified well enough to hold the entire dataset on 3 servers.
Unlike most installations we do NOT use membase as a cache for MYSql misses, we actually dropped mysql because membase has the persistence we need.
Once the servers have been moved I'd be adding them back to the cluster.
Hi there,
Without replication you cannot do this through a rebalance without losing data.
Once a bucket is created you cannot change its replication value. What you'll need to do is create a second bucket and migrate the data.
You could do this via some application-level logic to avoid any down
time, with something like:
In your GET wrapper, first check the new bucket for the value; if it's
not there:
- check the old bucket
- write the value to the new bucket
- remove it from the old bucket
- return it to the client
In your PUT wrapper, write to the new bucket, and delete from the old bucket.
Or, do the migration via mbrestore.
hope this helps
-Alex.