0

我有 config_server、query_router、shard1、shard2。

配置服务器.cfg

 storage:
  dbPath: C:\testMongodb_shard\config_server\data
  journal:
    enabled: true

systemLog:
  destination: file
  logAppend: true
  path:  C:\testMongodb_shard\config_server\log\configsvr.log

net:
  port: 27019
  bindIp: 127.0.0.1


sharding:
  clusterRole: configsvr

replication:
  replSetName: NguyenTongConfigReplSet

router_config.cfg

    systemLog:
  destination: file
  logAppend: true
  path: C:\testMongodb_shard\query_router\log\query_router.log

net:
  port: 27020
  bindIp: 127.0.0.1

sharding:
  configDB: NguyenTongConfigReplSet/127.0.0.1:27019

configShard1.cfg

storage:
  dbPath: C:\testMongodb_shard\shard1\data
  journal:
    enabled: true


systemLog:
  destination: file
  logAppend: true
  path:  C:\testMongodb_shard\shard1\log\shard1.log

net:
  port: 27021
  bindIp: 127.0.0.1


sharding:
  clusterRole: shardsvr

replication:
  replSetName: NguyenTongShardReplSet_1

configShard2.cfg

storage:
  dbPath: C:\testMongodb_shard\shard2\data
  journal:
    enabled: true


systemLog:
  destination: file
  logAppend: true
  path:  C:\testMongodb_shard\shard2\log\shard2.log

net:
  port: 27022
  bindIp: 127.0.0.1


sharding:
  clusterRole: shardsvr

replication:
  replSetName: NguyenTongShardReplSet_2

我完成了分片,我有 shard 1 和 shard 2我想将分片 1 移动到另一台机器上,我该怎么做? 请帮帮我,我不知道该怎么办。 在此处输入图像描述

4

0 回答 0