Quantcast

Manually replicating ZK

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Manually replicating ZK

michael.boom
Hi!

I have a ZK instance running on a machine and would like to increase this to instances o 3 different machines.

Would it be possible to simply copy the dataDir of the currently running instance on the 2 new machines, update the configuration for all three instances (adding the hosts&ports of all ) and then restarting all 3 ZK instances?

Would this work?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Manually replicating ZK

Patrick Hunt
That should work. Make sure you update the myid file appropriately.

Easier though you might just add the two new servers with consistent
configuration across all three. First start the original server, then
start 1 of the new servers, wait for it to form a quorum with server
1, then start server 3. No need to copy the datadirs.

Patrick

On Fri, Nov 8, 2013 at 7:30 AM, michael.boom <[hidden email]> wrote:

> Hi!
>
> I have a ZK instance running on a machine and would like to increase this to
> instances o 3 different machines.
>
> Would it be possible to simply copy the dataDir of the currently running
> instance on the 2 new machines, update the configuration for all three
> instances (adding the hosts&ports of all ) and then restarting all 3 ZK
> instances?
>
> Would this work?
>
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/Manually-replicating-ZK-tp7579282.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Manually replicating ZK

michael.boom
Thank you, great to know that!

I would also like to ditch the first one during this process and move to a 3 instance ZK quorum on three completely new machines.

Here's how i think of doing it:
1. reconfiguring server1 (the current one) to know of server2 ZK instance
2. start server1
3. start server2 and wait to form a quorum
4. stop server1 and forget about it.
5. stop server2 and reconfigure to know of server3 and server4
6. start server2
7. start server3 wait to get into quorum
8. start server3
9. enjoy!

Any problem with this?
Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Manually replicating ZK

Kuba Lekstan
Should work as long as in 5. all of the servers will have consistent
configuration.

Thanks.


2013/11/12 michael.boom <[hidden email]>

> Thank you, great to know that!
>
> I would also like to ditch the first one during this process and move to a
> 3
> instance ZK quorum on three completely new machines.
>
> Here's how i think of doing it:
> 1. reconfiguring server1 (the current one) to know of server2 ZK instance
> 2. start server1
> 3. start server2 and wait to form a quorum
> 4. stop server1 and forget about it.
> 5. stop server2 and reconfigure to know of server3 and server4
> 6. start server2
> 7. start server3 wait to get into quorum
> 8. start server3
> 9. enjoy!
>
> Any problem with this?
> Thanks!
>
>
>
> --
> View this message in context:
> http://zookeeper-user.578899.n2.nabble.com/Manually-replicating-ZK-tp7579282p7579305.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.
>
Loading...