V:\MongoDB\shard_data\shard1\Data V:\MongoDB\shard_data\shard2\Data V:\MongoDB\shard_data\shard3\Data 10.10.180.138 --install --serviceName "MongoDBShard-A" --serviceDisplayName "MongoDBShard-A" mongod --install --serviceName "MongoDBShard-A" --serviceDisplayName "MongoDBShard-A" --shardsvr --port 30017 --logpath "V:\MongoDB\shard_data\logs\shard1_1.log" --logappend --dbpath "V:\MongoDB\shard_data\shard1\data" --replSet shard1_replset mongod --install --serviceName "MongoDBShard-B" --serviceDisplayName "MongoDBShard-B" --shardsvr --port 28017 --logpath "V:\MongoDB\shard_data\logs\shard2_1.log" --logappend --dbpath "V:\MongoDB\shard_data\shard2\data" --replSet shard2_replset mongod --install --serviceName "MongoDBShard-C" --serviceDisplayName "MongoDBShard-C" --shardsvr --port 29017 --logpath "V:\MongoDB\shard_data\logs\shard3_1.log" --logappend --dbpath "V:\MongoDB\shard_data\shard3\data" --replSet shard3_replset mongo --host localhost --port 30017 mongo --host localhost --port 28017 mongo --host localhost --port 29017 rs.initiate( { _id: "shard1_replset", members: [ { _id : 0, host : "localhost:30017" } ] } ) rs.initiate( { _id: "shard2_replset", members: [ { _id : 0, host : "localhost:28017" } ] } ) rs.initiate( { _id: "shard3_replset", members: [ { _id : 0, host : "localhost:29017" } ] } ) V:\MongoDB\shard_data\config_server1\data1 V:\MongoDB\shard_data\config_server1\data2 V:\MongoDB\shard_data\config_server1\data3 mongod.exe --configsvr --port 47017 --logpath "V:\MongoDB\shard_data\logs\configsvr1_1.log" --logappend --dbpath "V:\MongoDB\shard_data\config_server1\data1" --replSet configserver1_replset --install --serviceName "MongoDBConfig-A" --serviceDisplayName "MongoDBConfig-A" mongod.exe --configsvr --port 47117 --logpath "V:\MongoDB\shard_data\logs\configsvr1_2.log" --logappend --dbpath "V:\MongoDB\shard_data\config_server1\data2" --replSet configserver1_replset --install --serviceName "MongoDBConfig-B" --serviceDisplayName "MongoDBConfig-B" mongod.exe --configsvr --port 47217 --logpath "V:\MongoDB\shard_data\logs\configsvr1_3.log" --logappend --dbpath "V:\MongoDB\shard_data\config_server1\data3" --replSet configserver1_replset --install --serviceName "MongoDBConfig-C" --serviceDisplayName "MongoDBConfig-C" mongo --host localhost --port 47017 rs.initiate( { _id: "configserver1_replset", configsvr: true, //indicates it is config server replica-set members: [ { _id : 0, host : "localhost:47017" }, { _id : 1, host : "localhost:47117" }, { _id : 2, host : "localhost:47217" } ] } ) mongos.exe --configdb configserver1_replset/localhost:47017,localhost:47117,localhost:47217 --port 1000 mongos.exe --configdb MongoDBConfigshardReplSet/localhost:7002 --port 1000 mongo --host localhost --port 1000 sh.addShard("shard1_replset/localhost:30017") sh.addShard("shard2_replset/localhost:28017") sh.addShard("shard3_replset/localhost:29017") sh.status() sh.enableSharding("reconsilation") mongoimport --host localhost --port 1000 db.cdr_row.count()