简体   繁体   中英

Changing replication factor of an already running cluster in YugabyteDB

[Question posted by a user on YugabyteDB Community Slack ]

I've been googling a bit and it seems that, although it is not recommended to change the RF of an already running cluster, is it possible?

We support changing RF at the database layer at the very least. One way this can be accomplished is by using the modify_placement_info command in yb-admin [see yb-admin doc]. For example, if you have 3 nodes, one in cloud-c1, region-r1, and zone-z1, one in c2.r2.z2, and one in c3.r3.z3, you can use the below command to increase the RF to 3.

bin/yb-admin --master_addresses {list of master IPs:Ports} modify_placement_info c1.r1.z1,c2.r2.z2,c3.r3.z3 3

Another way to control RF is to use tablespaces https://docs.yugabyte.com/preview/explore/ysql-language-features/going-beyond-sql/tablespaces/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM