MongoDB Add and remove Arbiter node instances _mongodb

Source: Internet
Author: User
Tags mongodb add

Increase Arbiter

Add the profile mongod1,mongod2,mongod3 to the arbiter of Shard1,shard2,shard3 three set sets, respectively.

Copy Code code as follows:

Replset=shard1
Replset=shard2
Replset=shard3

Start the Mongod instance.
Connect primary.
Copy Code code as follows:

Rs.addarb ("192.168.1.50:10001″")
Rs.addarb ("192.168.1.50:10002″")
Rs.addarb ("192.168.1.50:10003″")

Remove Arbiter
Copy Code code as follows:

Rs.remove ("192.168.1.50:10001″")

Note: It is best to stop the service before removing the node to prevent a special unknown state from appearing.

Note:before running the Rs.remove () operation, you must shut down the replica set member that is you ' re removing.
Changed in version 2.2:this procedure are no longer required when using Rs.remove (), but it remains good practice.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.