草庐IT

shardsvr

全部标签

MongoDB shardsvr 选项?

根据documentation,shardsvr选项的默认值为false:Setthisvaluetotruetoconfigurethismongodinstanceasashardinapartitionedcluster.Thedefaultportfortheseinstancesis27018.Theonlyaffectofshardsvristochangetheportnumber.似乎需要shardsvr才能将实例配置为分片。但随后它说唯一的影响是更改端口号。为什么我需要这样更改端口?已经有port选项...mongod--port27019--dbpath/data/

MongoDB 3.4 分片错误。 "Cannot accept sharding commands if not started with --shardsvr"

我在centOS7.2机器上安装了mongoDB3.4.5。我在独立模式下配置分片。我遵循的步骤:对于副本集:mongod--replSetrs0--dbpath/data/srd/rs0--logpath/data/srd/rs0/log.rs0--port27000--fork--logappend--smallfiles--oplogSize50&mongod--replSetrs0--dbpath/data/srd/rs1--logpath/data/srd/rs1/log.rs1--port27001--fork--logappend--smallfiles--oplogSi