Advertisement
Guest User

Shardeando

a guest
May 6th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. cd ~
  2. cd mongo-bdw
  3. mkdir config
  4. mongod --configsvr --dbpath ~/mongo-bdw/config --port 20001
  5. mongos --configdb jarvis:20001 --port 27017 --chunkSize 1
  6.  
  7. mkdir -p rs1-0 rs1-1 rs1-2
  8. mongod --port 27010 --dbpath ~/mongo-bdw/rs1-0 --replSet rs1 --smallfiles --noprealloc
  9. mongod --port 27011 --dbpath ~/mongo-bdw/rs1-1 --replSet rs1 --smallfiles --noprealloc
  10. mongod --port 27012 --dbpath ~/mongo-bdw/rs1-2 --replSet rs1 --smallfiles --noprealloc
  11.  
  12. rs.initiate()
  13. rs.add("<hostname:27011>")
  14. rs.add("<hostname:27012>")
  15. rs.status()
  16.  
  17. mongo
  18. #nomongo
  19. sh.addShard("rs0/jarvis:27000,jarvis:27001,jarvis:27002")
  20. sh.addShard("rs1/jarvis:27010,jarvis:27011,jarvis:27012")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement