tandlisten] 2017-04-24T22:59:43.476+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2017-04-24T22:59:43.476+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2017-04-24T22:59:44.019+0800 I CONTROL [initandlisten] > rs.initiate() { "info2" : "no configuration specified. Using a default configuration for the set", "me" : "test1.lan:37017", "ok" : 1 } shard-b:SECONDARY> shard-b:PRIMARY> config = rs.config() { "_id" : "shard-b", "version" : 1, "protocolVersion" : NumberLong(1), "members" : [ { "_id" : 0, "host" : "test1.lan:37017", "arbiterOnly" : false, "buildIndexes" : true, "hidden" : false, "priority" : 1, "tags" : { }, "slaveDelay" : NumberLong(0), "votes" : 1 } ], "settings" : { "chainingAllowed" : true, "heartbeatIntervalMillis" : 2000, "heartbeatTimeoutSecs" : 10, "electionTimeoutMillis" : 10000, "catchUpTimeoutMillis" : 2000, "getLastErrorModes" : { }, "getLastErrorDefaults" : { "w" : 1, "wtimeout" : 0 }, "replicaSetId" : ObjectId("58fe1465f7a2e985d87b8bf8") } } shard-b:PRIMARY> config.members[0].priority = 2 2 shard-b:PRIMARY> rs.reconfig(config) { "ok" : 1 } shard-b:PRIMARY> rs.add("test2.lan:37017") { "ok" : 1 } shard-b:PRIMARY> rs.add("test3.lan:37017") { "ok" : 1 } shard-b:PRIMARY> rs.isMaster() { "hosts" : [ "test1.lan:37017", "test2.lan:37017", "test3.lan:37017" ], "setName" : "shard-b", "setVersion" : 4, "ismaster" : true, "secondary" : false, "primary" : "test1.lan:37017" |