What I'm wondering is if it is possible to shard an existing database
that was previously using mongod. Is it possible to shard this old
database and use mongos? If so, how do I go about doing this?
Thanks!
That should be it
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en
> .
>
>
1) restart mongod on port 27018 <-- am I doing this using --shardsvr?
2) start config server
3) start mongod <-- I don't need to start mongos?
4) add only your previous mongod as a shard
5) do at least a show collections for each db on the mongod through
mongod <-- I don't quite understand the "through mongod". Is this the
mongo console?
Thanks! At least I know that it is possible.
On Jan 7, 12:35 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> It's actually pretty easy
> What I would do if 5 min of downtime is ok (if not you should see how
> to do it without)
> 1) restart mongod on port 27018
> 2) start config server
> 3) start mongod
> 4) add only your previous mongod as a shard
> 5) do at least a show collections for each db on the mongod through
> mongod
>
> That should be it
>
Thanks for your help!
> Actually, I think I've figured it out. I tried running steps 1-5 with
> the modifications I mentioned in my previous post and it seems to have
> worked. I then added another shard server and after inserting some
> records, MongoDB automatically moved chunks over to the second shard.
>
> Thanks for your help!
I'm not sure I understand the last part you wrote there. Do you mean that mongodb started to migrate/rebalance your original data from the original single database over multiple shards?
If that is the case, I will *definitely* have to check this out!
cr
cr