What version are you using?
Yes, you should not do this. While this may be useful for testing this
would never be something you want for a production system. You will
get an error message when running removeshard if you only have one
shard -- this is not allowed.
If you want to start over it is best to stop everything, remove the
data, and restart with a blank slate.
On Sun, Sep 16, 2012 at 4:45 AM, Sam Darwin <
samuel....@gmail.com> wrote:
>
> Hi , I am a newbie and just learning mongo.
>
> I added some shards:
>
> db.runCommand({addshard : "mongo1:27018", name:"shard1"})
> db.runCommand({addshard : "mongo2:27018", name:"shard2"})
>
> and deleted some shards:
>
> db.runCommand({removeshard : "mongo1:27018"})
> db.runCommand({removeshard : "mongo2:27018"})
>
> and now I observe this with:
>
> db.printShardingStatus()
>
> mongos> db.printShardingStatus()
> --- Sharding Status ---
> sharding version: { "_id" : 1, "version" : 3 }
> shards:
> { "_id" : "shard1", "draining" : true, "host" : "mongo1:27018" }
> databases:
> { "_id" : "test2", "partitioned" : false, "primary" : "shard1" }
> { "_id" : "test", "partitioned" : false, "primary" : "shard1" }
> { "_id" : "admin", "partitioned" : false, "primary" : "config" }
>
> It is draining, and nothing I do will get it to stop draining.
>
> My theory is that you can't ever drain down to 0 shards. But there are
> two problems with this.
>
> 1. It would be nice to see a message indicating that. Where am I being
> informed of it?
> 2. During testing, you might like to set things up, and tear them down, and
> set them up again. But you are preventing me from doing this sort of
> testing?
>
> Thanks,
> Sam
>
>
> --
> 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
> See also the IRC channel --
freenode.net#mongodb