我已经mongodb使用yum安装了一个实例。. 现在一切正常。我使用service mongod start. 它运作良好。然后我更改了配置文件中的data directory和log path。我再次重新启动服务器并启动了服务。但我收到以下错误:
Restarting mongod (via systemctl): Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[FAILED]
Run Code Online (Sandbox Code Playgroud)
当我给时,systemctl status mongod.service我得到以下信息:
Loaded: loaded (/etc/rc.d/init.d/mongod)
Active: failed (Result: exit-code) since Wed 2015-03-18 11:35:56 IST; 22s ago
Process: 10672 ExecStop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/SUCCESS)
Process: 10841 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
Main PID: 10509 (code=exited, status=0/SUCCESS)
Mar 18 11:35:56 localhost systemd[1]: Starting SYSV: …Run Code Online (Sandbox Code Playgroud) 即使重新启动后,节点也会在恢复模式下记录:
2018-04-24T12:37:52.915+0530 I REPL [replication-0] We are too stale to use J-DB-02:27017 as a sync source. Blacklisting this sync source because our last fetched timestamp: 5ade01e0:66 is before their earliest timestamp: 5aded094:198 for 1min until: 2018-04-24T12:38:52.915+0530 2018-04-24T12:37:52.916+0530 I REPL [replication-0] could not find member to sync from 2018-04-24T12:37:52.916+0530 E REPL [rsBackgroundSync] too stale to catch up -- entering maintenance mode 2018-04-24T12:37:52.916+0530 I REPL [rsBackgroundSync] Our newest OpTime : { ts: Timestamp 1524498912000|102, t: 68 } 2018-04-24T12:37:52.916+0530 I REPL [rsBackgroundSync] Earliest …Run Code Online (Sandbox Code Playgroud) 我是mongodb的新手。我已经设置了一个mongodb 架构,其中一个mongo shard(mongos)连接到三个shards(replica sets),三个配置服务器。架构如下所示:

现在mongos与这些分片相连。mongos 中的数据将被拆分到这三个分片中。我怀疑的是它们是否shard 1包含与3 个分片完全相同的数据shard 2,shard 3或者所有 3 个分片都有不同的数据。