sharding removal stuck with draining

292 views
Skip to first unread message

Edward Chuang

unread,
Sep 2, 2014, 4:39:25 AM9/2/14
to mongod...@googlegroups.com
Hi,

I've tried to remove a shard two weeks ago and the shard status is keep on draining.
I've tried to use sh.status(true) to make sure there's no chunks resides on that shard but the problem still exists.

How can I solve this problem since I have another shard to remove.
Thanks for your kindly help.

-Edward

Edward Chuang

unread,
Sep 2, 2014, 4:57:17 AM9/2/14
to mongod...@googlegroups.com
Here's some follow up:

db.locks.find()

{ "_id" : "configUpgrade", "state" : 0, "who" : "us-freqcap0:27017:1407226362:1804289383:mongosMain:846930886", "ts" : ObjectId("53e091faef8adbc4448f2c11"), "process" : "us-freqcap0:27017:1407226362:1804289383", "when" : ISODate("2014-08-05T08:12:42.230Z"), "why" : "upgrading config database to new format v5" }
{ "_id" : "balancer", "state" : 0, "who" : "us-freqcap0:27017:1409645499:1804289383:Balancer:846930886", "ts" : ObjectId("540585a4b84ffccb992bfb38"), "process" : "us-freqcap0:27017:1409645499:1804289383", "when" : ISODate("2014-09-02T08:53:56.668Z"), "why" : "doing balance round" }
{ "_id" : "user_tracking.user_info", "state" : 0, "who" : "us-freqcap-mongo-s14:27017:1409421249:2138801761:conn5330:173119898", "ts" : ObjectId("540556053862d59c496bef3a"), "process" : "us-freqcap-mongo-s14:27017:1409421249:2138801761", "when" : ISODate("2014-09-02T05:30:45.042Z"), "why" : "split-{ _id: \"45\" }" }
{ "_id" : "user_tracking.user_pair", "state" : 0, "who" : "us-freqcap-mongo-s4:27017:1407409217:80764476:conn32015:105255058", "ts" : ObjectId("5404913c460a4a08fa65967a"), "process" : "us-freqcap-mongo-s4:27017:1407409217:80764476", "when" : ISODate("2014-09-01T15:31:08.565Z"), "why" : "migrate-{ _id: \"4\" }" }
{ "_id" : "user_tracking.user_partner_id", "state" : 0, "who" : "us-freqcap-mongo-s1:27017:1407588242:735984531:conn116400:2032630151", "ts" : ObjectId("53f6e4a47c5b487a2eada979"), "process" : "us-freqcap-mongo-s1:27017:1407588242:735984531", "when" : ISODate("2014-08-22T06:35:16.003Z"), "why" : "migrate-{ _id: \"377a86b8eb3fd6bdae3a974512c33990275d6725\" }" }
{ "_id" : "user_tracking-movePrimary", "state" : 0, "who" : "us-freqcap0:27017:1407627873:1804289383:conn1051385:1681692777", "ts" : ObjectId("53f554ea80bac1a92f3a866e"), "process" : "us-freqcap0:27017:1407627873:1804289383", "when" : ISODate("2014-08-21T02:09:46.400Z"), "why" : "Moving primary shard of user_tracking" }

sh.status()

--- Sharding Status ---
  sharding version: {
        "_id" : 1,
        "version" : 4,
        "minCompatibleVersion" : 4,
        "currentVersion" : 5,
        "clusterId" : ObjectId("53e091faef8adbc4448f2c13")
}
  shards:
        {  "_id" : "us_freqcap_1",  "host" : "us_freqcap_1/us-freqcap-mongo-s1:27017,us-freqcap-mongo-s2:27017",  "draining" : true }
        {  "_id" : "us_freqcap_2",  "host" : "us_freqcap_2/us-freqcap-mongo-s3:27017,us-freqcap-mongo-s4:27017" }
        {  "_id" : "us_freqcap_3",  "host" : "us_freqcap_3/us-freqcap-mongo-s5:27017,us-freqcap-mongo-s6:27017" }
        {  "_id" : "us_freqcap_4",  "host" : "us_freqcap_4/us-freqcap-mongo-s7:27017,us-freqcap-mongo-s8:27017" }
        {  "_id" : "us_freqcap_5",  "host" : "us_freqcap_5/us-freqcap-mongo-s10:27017,us-freqcap-mongo-s9:27017" }
        {  "_id" : "us_freqcap_6",  "host" : "us_freqcap_6/us-freqcap-mongo-s11:27017,us-freqcap-mongo-s12:27017" }
        {  "_id" : "us_freqcap_7",  "host" : "us_freqcap_7/us-freqcap-mongo-s13:27017,us-freqcap-mongo-s14:27017" }
        {  "_id" : "us_freqcap_8",  "host" : "us_freqcap_8/us-freqcap-mongo-s15:27017,us-freqcap-mongo-s16:27017" }
  databases:
        {  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
        {  "_id" : "user_tracking",  "partitioned" : true,  "primary" : "us_freqcap_3" }
                user_tracking.user_info
                        shard key: { "_id" : 1 }
                        chunks:
                                us_freqcap_3    70
                                us_freqcap_5    67
                                us_freqcap_7    71
                                us_freqcap_8    69
                                us_freqcap_2    73
                                us_freqcap_4    71
                                us_freqcap_6    66
                        too many chunks to print, use verbose if you want to force print
                user_tracking.user_pair
                        shard key: { "_id" : 1 }
                        chunks:
                                us_freqcap_7    3
                                us_freqcap_3    3
                                us_freqcap_5    3
                                us_freqcap_8    3
                                us_freqcap_2    4
                                us_freqcap_6    3
                                us_freqcap_4    4
                        too many chunks to print, use verbose if you want to force print
                user_tracking.user_partner_id
                        shard key: { "_id" : 1 }
                        chunks:
                                us_freqcap_5    32
                                us_freqcap_4    32
                                us_freqcap_6    32
                                us_freqcap_7    32
                                us_freqcap_8    32
                                us_freqcap_3    32
                                us_freqcap_2    33
                        too many chunks to print, use verbose if you want to force print
        {  "_id" : "user_tracking_dev",  "partitioned" : false,  "primary" : "us_freqcap_5" }

Edward Chuang於 2014年9月2日星期二UTC+8下午4時39分25秒寫道:

Asya Kamsky

unread,
Sep 4, 2014, 4:55:41 AM9/4/14
to mongodb-user
Your sh.status() output seems to show that there are no chunks
remaining on the draining shard.

What message do you get when you run

db.runCommand( { removeShard: "us_freqcap_1" } )

Asya
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user"
> group.
>
> For other MongoDB technical support options, see:
> http://www.mongodb.org/about/support/.
> ---
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongodb-user...@googlegroups.com.
> To post to this group, send email to mongod...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mongodb-user.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mongodb-user/2f03bd91-3efb-48a7-acfa-dab63269de14%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages