在从库上执行如下命令:
repset:SECONDARY> rs.slaveOk()
repset:SECONDARY> db.runCommand({"resync":1})
{
"ok" : 0,
"errmsg" : "resync may only be run against the admin database.",
"code" : 13
}
repset:SECONDARY> use admin
switched to db admin
repset:SECONDARY> db.runCommand({"resync":1})
{ "ok" : 1 }
repset:STARTUP2>