Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7777

removeShard docs should note that only one shard can be in draining state

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 01112017-cleanup
    • None
    • None
    • None

    Description

      The removeShard documentation (and possibly other related pages) should note that only one shard in a cluster can be in "draining" state at a given time.

      This is what happens if one tries to remove more than one shard in a cluster:

      mongos> db.runCommand({removeShard: "shard01"})
      {
              "msg" : "draining started successfully",
              "state" : "started",
              "shard" : "shard01",
              "note" : "you need to drop or movePrimary these databases",
              "dbsToMove" : [
                      "test"
              ],
              "ok" : 1
      }
      mongos> db.runCommand({removeShard: "shard02"})
      {
              "ok" : 0,
              "errmsg" : "Can't have more than one draining shard at a time",
              "code" : 117
      }
      

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 32 weeks, 6 days ago