Background: The replica set of normal work 1 Master 2 decides from 1 and hangs one (master or slave) and is named F. Then remove the hanged machine F from rs.conf(). After a month, F was repaired, the hard drive was not broken, the data was still there, but it was already very outdated data.
Requirement: Re-mount this machine F into the replica set.
Steps: 0) Close the mongodb above F. The insurance method is to use db.shutdownServer();
1) On the primary server, rs.add() adds F to the configuration of the replica set.
You need to set F to hidden state to prevent the front-end module from connecting to this machine. .
When this value is true, the replica set hides this instance and does not include the member in the output of db.isMaster() or isMaster. This prevents read operations (ie queries) from ever reaching this host by Way of secondary read preference.
rs.add({_id: 10, host: “mongodb3.example.net:27017″, priority: 0, hidden: true})
priority A value of 0 indicates that it does not participate in the voting to become the activity of the primary server.
2) Delete all directories and files in the dbpath of F.
3) Start mongodb on F
cd /home/mongodb && numactl –interleave=all ./bin/mongod -f ./conf/mongod.conf > /dev/null 2>&1
Then the automatic master-slave synchronization starts.
4) Consider removing the hidden and priority attributes.
“ A real programmer does not need an IDE. They all use a text editor with a plugin to write c
System Requirements: Unlimited release, requires PC platform (x86 architecture CPU), Glibc version
Azure is one of the representatives of more and more companies considering moving their business to
you want under Linux How to install the jdk you want under Linux? Last time we talked about how to u
Introduction to jiffies in the Linux kernel and their effects
The old machine's Linux hard disk plan
How to limit the execution permission of the /tmp partition
Linux FTP server build tutorial
How to get the motherboard information under Linux system
How to modify the Linux MAC address in the VMware virtual machine
Linux does not start properly. Solution
View file and folder size under Linux
Under linux rm delete non-empty directory
Where is the Win7 system local connection found?
Windows 7 system prohibits the automatic installation of the driver method
Win10 th2 push update? Win10 Th2 update content and new features summary
How to improve the download speed of Thunder? How to make 4 times speed?
What should I do if I have a Win10 card? I can disable the blurring effect and transparency.
Analysis said that the Windows 8-ARM combination will spawn new low-cost notebooks
Win10 mobile version how to set up a blacklist of calls
Common fault resolution under Windows 7 operating system
Win7 system computer boot boot error how to solve
Win10 how to share Wifi Win10 shared Wifi wireless network settings tutorial