Daniel Mantovani <daniel.oliveira.mantovani@...> writes:
>
> Hi,
>
> Thank you very much!
>
> []'s!
>
Hi, this "1 or more "mongod" without --configsvr (I think you are missing
these)" wasn't much clear to me. Apparently you need 1 or more mongod
without the --configsvr on different ports and folders(shards) + a mongos
command on all of the --configsvr mongod(s) and sh.addShard on the mongod(s)
without --configsvr.
These are the exact steps to solve it:
already created folders (deleted everything in them):
C:\mongodb\data\configdb\shard1
C:\mongodb\data\configdb\shard2
C:\mongodb\data\configdb\shard3
C:\mongodb\data\configdb\shard4
C:\mongodb\data\configdb\shard5
C:\mongodb\data\configdb\shard6
The following commands are executed from cmd and path is set to (cd
C:\mongodb\bin):
mongod --configsvr --dbpath C:\mongodb\data\configdb\shard1 --port 27019
mongod --configsvr --dbpath C:\mongodb\data\configdb\shard2 --port 27020
mongod --configsvr --dbpath C:\mongodb\data\configdb\shard3 --port 27021
mongod --dbpath C:\mongodb\data\configdb\shard4 --port 27022
mongod --dbpath C:\mongodb\data\configdb\shard5 --port 27023
mongod --dbpath C:\mongodb\data\configdb\shard6 --port 27024
mongos --configdb localhost:27019,localhost:27020,localhost:27021
db mydb
sh.addShard("localhost:27022")
sh.addShard("localhost:27023")
sh.addShard("localhost:27024")
Cheers,
despot