何小伟-向Mongodb集群添加新成员节点.docVIP

  • 39
  • 0
  • 约1.21万字
  • 约 12页
  • 2017-06-24 发布于湖北
  • 举报
向Mongodb集群添加的成员拷贝其他节点的数据文件到新的节点向已有的replica set 添加新成员 拷贝其他节点的数据文件到新的节点在启动mongod服务之前要拷贝数据文件到本机。下面是空库添加到一个replica set中的日志记录: #### 连接rimary库 Tue Nov 1 14:22:57 [initandlisten] connection accepted from 10.250.7.220:54235 #2 Tue Nov 1 14:22:57 [initandlisten] connection accepted from 10.250.7.220:54236 #3 Tue Nov 1 14:22:57 [initandlisten] connection accepted from 10.250.7.220:54237 #4 Tue Nov 1 14:22:57 [rsStart] trying to contact 10.250.7.220:27018 Tue Nov 1 14:22:57 [rsStart] trying to contact 10.250.7.220:27019 Tue Nov 1 14:22:57 [rsStart] trying to contact 10.250.7.220:27020 第二步:####从primary库复制replica set的配置信息,并保存到本地 -dbpath 指定的文件目录#### Tue Nov 1 14:22:57 [rsStart] replSet got config version 2 from a remote, saving locally Tue Nov 1 14:22:57 [rsStart] replSet info saving a newer config version to local.system.replset Tue Nov 1 14:22:57 [FileAllocator] allocating new datafile /opt/mongodata/r1/local.ns, filling with zeroes... Tue Nov 1 14:22:57 [FileAllocator] creating directory /opt/mongodata/r1/_tmp Tue Nov 1 14:22:57 [FileAllocator] done allocating datafile /opt/mongodata/r1/local.ns, size: 16MB, took 0.118 secs Tue Nov 1 14:22:57 [FileAllocator] allocating new datafile /opt/mongodata/r1/local.0, filling with zeroes... Tue Nov 1 14:23:01 [FileAllocator] done allocating datafile /opt/mongodata/r1/local.0, size: 64MB, took 3.807 secs Tue Nov 1 14:23:01 [FileAllocator] allocating new datafile /opt/mongodata/r1/local.1, filling with zeroes... Tue Nov 1 14:23:02 [rsStart] replSet saveConfigLocally done Tue Nov 1 14:23:02 [FileAllocator] done allocating datafile /opt/mongodata/r1/local.1, size: 128MB, took 1.068 secs Tue Nov 1 14:23:02 [rsStart] replSet STARTUP2 Tue Nov 1 14:23:02 [rsMgr] replSet total number of votes is even - add arbiter or give one member an extra vote Tue Nov 1 14:23:02 [rsSync] ****** 第三步:####创建oplog 日志文件#### Tue Nov 1 14:23:02 [rsSync] creating replication oplog of size: 944MB... Tue Nov 1 14:23:02 [FileAllocator] allocati

文档评论(0)

1亿VIP精品文档

相关文档