mongod --smallfiles --configsvr --dbpath ~/work/src/aprili_int_training/shardex1/data/configdb --port 27019 --fork --logpath ~/work/src/aprili_int_training/shardex1/data/mongoconfdb.log mongos --configdb `hostname` --fork --logpath ~/work/src/aprili_int_training/shardex1/data/mongos.log mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s1rs1 --port 20001 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s1rs1.log --replSet trainings1 --oplogSize 10 --fork mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s1rs2 --port 20002 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s1rs2.log --replSet trainings1 --oplogSize 10 --fork mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s1arb --port 20003 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s1arb.log --replSet trainings1 --fork mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s2rs1 --port 20011 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s2rs1.log --replSet trainings2 --oplogSize 10 --fork mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s2rs2 --port 20012 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s2rs2.log --replSet trainings2 --oplogSize 10 --fork mongod --smallfiles --dbpath ~/work/src/aprili_int_training/shardex1/data/s2arb --port 20013 --logpath ~/work/src/aprili_int_training/shardex1/data/mongod_s2arb.log --replSet trainings2 --fork ______________ > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "emilios-MacBook-Pro.local:20001", "ok" : 1 } trainings1:SECONDARY> rs.add("emilios-MacBook-Pro.local:20002") { "ok" : 1 } trainings1:PRIMARY> rs.conf() ________________ > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "emilios-MacBook-Pro.local:20011", "ok" : 1 } trainings2:SECONDARY> rs.add("emilios-MacBook-Pro.local:20012") { "ok" : 1 } trainings2:PRIMARY> rs.conf() _________________ mongos> sh.addShard("trainings1/emilios-MacBook-Pro.local:20001") { "shardAdded" : "trainings1", "ok" : 1 } mongos> sh.addShard("trainings2/emilios-MacBook-Pro.local:20011") { "shardAdded" : "trainings2", "ok" : 1 } mongos> sh.enableSharding("training") { "ok" : 1 } mongos> sh.shardCollection("training.ex1", {x:1})