Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to learn sharding in MongoDb and here is my plan:

enter image description here

I'm trying to shard the database S001 into 2 different machines.

192.xx.xx.60>mongod -configsvr --dbpath S001
..Now running in port 27019


show dbs
S001 0.74151GB

Only one database S001 is there

192.xx.xx.60>mongos -configdb 192.xx.xx.60:27019,192.xx.xx.61:27019,192.xx.xx.62:27019 ..Some messages...


show dbs
config 0.54125GB
admin empty

Whereas now it is showing 2 different databases called config and admin.

I don't understand the following points:
1. how were these 2 new database created?
2. Is my database now sharded?
3. How to continue further?

FYI: Still now I haven't set up replication so I'm trying to shard without replication.

Totally stuck and unable to continue further. Please share your suggestions.

share|improve this question

migrated from Dec 23 '13 at 4:10

This question came from our site for professional and enthusiast programmers.

have you started the mongod daemons on 192.xx.xx.61:27019 and 192.xx.xx.62:27019? These need to be running. – user152468 Dec 11 '13 at 9:48
@user152468 Yes I have started running those mongod daemons. otherwise mongos -configdb 192.xx.xx.60:27019,192.xx.xx.61:27019,192.xx.xx.62:27019 would have resulted in error. – Praveen Dec 11 '13 at 9:55
I suggest following the Deploy a Sharded Cluster tutorial in the MongoDB manual. It looks like you're at the step where you need to add shards to the cluster. You see the config and admin databases because you've connected your mongos to the config servers, but you do not have a functional cluster without adding the shards. You'll also need to shard your database and collections once the cluster is setup (as per the tutorial). – Stennie Jan 3 '14 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.