<section>
 <h1 class="contains-headerlink leafygreen-ui-41fr9s" weight="medium">
  Sharding Commands
  <a class="headerlink leafygreen-ui-1kepx47" href="#sharding-commands" title="Permalink to this heading">
   <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
    <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
    </path>
    <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
    </path>
   </svg>
   <div class="css-1btu0w3 evvkmar0" id="sharding-commands">
   </div>
  </a>
 </h1>
 <div class="leafygreen-ui-15mdk4" role="note">
  <h2 class="leafygreen-ui-6n7b7d">
   Note
  </h2>
  <div class="leafygreen-ui-9mycqc">
   <p class="leafygreen-ui-1kp3ins">
    For details on a specific command, including syntax and examples,
click on the link to the command's reference page.
   </p>
  </div>
 </div>
 <div class="leafygreen-ui-skkc39" tabindex="0">
  <table class="leafygreen-ui-hr8lsv">
   <colgroup>
    <col style="width:30%"/>
    <col style="width:70%"/>
   </colgroup>
   <thead class="leafygreen-ui-a9ho40">
    <tr data-testid="leafygreen-ui-header-row">
     <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
      <div class="leafygreen-ui-ui0te9">
       <div>
        Name
       </div>
      </div>
     </th>
     <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
      <div class="leafygreen-ui-ui0te9">
       <div>
        Description
       </div>
      </div>
     </th>
    </tr>
   </thead>
   <tbody>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/abortMoveCollection/#mongodb-dbcommand-dbcmd.abortMoveCollection">
         <code class="leafygreen-ui-1l06pbn">
          abortMoveCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Stops an in-progress
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/moveCollection/#mongodb-dbcommand-dbcmd.moveCollection">
          <code class="leafygreen-ui-1l06pbn">
           moveCollection
          </code>
         </a>
         operation.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           8.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/abortReshardCollection/#mongodb-dbcommand-dbcmd.abortReshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          abortReshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Aborts a
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-reshard-a-collection/#std-label-sharding-resharding">
          resharding operation
          <!-- -->
          .
         </a>
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           5.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/abortUnshardCollection/#mongodb-dbcommand-dbcmd.abortUnshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          abortUnshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Stops an in-progress
         <code class="leafygreen-ui-1l06pbn">
          unshardCollection
         </code>
         operation.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           8.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/addShard/#mongodb-dbcommand-dbcmd.addShard">
         <code class="leafygreen-ui-1l06pbn">
          addShard
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Adds a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-shard">
         shard
        </a>
        to a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-sharded-cluster">
         sharded cluster
         <!-- -->
         .
        </a>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/addShardToZone/#mongodb-dbcommand-dbcmd.addShardToZone">
         <code class="leafygreen-ui-1l06pbn">
          addShardToZone
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Associates a shard with a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zone">
         zone
        </a>
        . Supports configuring
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/zone-sharding/#std-label-zone-sharding">
         zones
        </a>
        in sharded clusters.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/analyzeShardKey/#mongodb-dbcommand-dbcmd.analyzeShardKey">
         <code class="leafygreen-ui-1l06pbn">
          analyzeShardKey
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Calculates metrics for evaluating a shard key.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           7.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/balancerCollectionStatus/#mongodb-dbcommand-dbcmd.balancerCollectionStatus">
         <code class="leafygreen-ui-1l06pbn">
          balancerCollectionStatus
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Returns information on whether the chunks of a sharded
collection are balanced.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/balancerStart/#mongodb-dbcommand-dbcmd.balancerStart">
         <code class="leafygreen-ui-1l06pbn">
          balancerStart
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Starts a balancer thread.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/balancerStatus/#mongodb-dbcommand-dbcmd.balancerStatus">
         <code class="leafygreen-ui-1l06pbn">
          balancerStatus
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Returns information on the balancer status.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/balancerStop/#mongodb-dbcommand-dbcmd.balancerStop">
         <code class="leafygreen-ui-1l06pbn">
          balancerStop
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Stops the balancer thread.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/checkMetadataConsistency/#mongodb-dbcommand-dbcmd.checkMetadataConsistency">
         <code class="leafygreen-ui-1l06pbn">
          checkMetadataConsistency
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Performs a series of consistency checks on sharding metadata.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           7.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/clearJumboFlag/#mongodb-dbcommand-dbcmd.clearJumboFlag">
         <code class="leafygreen-ui-1l06pbn">
          clearJumboFlag
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Clears the
        <code class="leafygreen-ui-1l06pbn">
         jumbo
        </code>
        flag for a chunk.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/cleanupReshardCollection/#mongodb-dbcommand-dbcmd.cleanupReshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          cleanupReshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Cleans up a failed
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-reshard-a-collection/#std-label-sharding-resharding">
          resharding operation
          <!-- -->
          .
         </a>
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           5.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/commitReshardCollection/#mongodb-dbcommand-dbcmd.commitReshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          commitReshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Forces a
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-reshard-a-collection/#std-label-sharding-resharding">
          resharding operation
         </a>
         to
block writes and complete.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           5.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/configureCollectionBalancing/#mongodb-dbcommand-dbcmd.configureCollectionBalancing">
         <code class="leafygreen-ui-1l06pbn">
          configureCollectionBalancing
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Configures balancer settings on a sharded collection.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           5.3
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/configureQueryAnalyzer/#mongodb-dbcommand-dbcmd.configureQueryAnalyzer">
         <code class="leafygreen-ui-1l06pbn">
          configureQueryAnalyzer
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Configures query sampling for a collection.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           7.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/enableSharding/#mongodb-dbcommand-dbcmd.enableSharding">
         <code class="leafygreen-ui-1l06pbn">
          enableSharding
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Creates a database.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/flushRouterConfig/#mongodb-dbcommand-dbcmd.flushRouterConfig">
         <code class="leafygreen-ui-1l06pbn">
          flushRouterConfig
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Forces a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
         <code class="leafygreen-ui-1l06pbn">
          mongod
         </code>
        </a>
        /
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongos/#mongodb-binary-bin.mongos">
         <code class="leafygreen-ui-1l06pbn">
          mongos
         </code>
        </a>
        instance to update its cached routing metadata.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/getShardMap/#mongodb-dbcommand-dbcmd.getShardMap">
         <code class="leafygreen-ui-1l06pbn">
          getShardMap
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Returns the hostnames and connection strings for shards in the
cluster and the config servers for your cluster.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/isdbgrid/#mongodb-dbcommand-dbcmd.isdbgrid">
         <code class="leafygreen-ui-1l06pbn">
          isdbgrid
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Verifies that a process is a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongos/#mongodb-binary-bin.mongos">
         <code class="leafygreen-ui-1l06pbn">
          mongos
         </code>
         .
        </a>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/listShards/#mongodb-dbcommand-dbcmd.listShards">
         <code class="leafygreen-ui-1l06pbn">
          listShards
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Returns a list of configured shards.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/moveChunk/#mongodb-dbcommand-dbcmd.moveChunk">
         <code class="leafygreen-ui-1l06pbn">
          moveChunk
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Internal command that migrates chunks between shards.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/movePrimary/#mongodb-dbcommand-dbcmd.movePrimary">
         <code class="leafygreen-ui-1l06pbn">
          movePrimary
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Reassigns the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary-shard">
         primary shard
        </a>
        when removing a shard from a sharded cluster.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/moveRange/#mongodb-dbcommand-dbcmd.moveRange">
         <code class="leafygreen-ui-1l06pbn">
          moveRange
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Migrates ranges between shards.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/mergeAllChunksOnShard/#mongodb-dbcommand-dbcmd.mergeAllChunksOnShard">
         <code class="leafygreen-ui-1l06pbn">
          mergeAllChunksOnShard
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Squashes
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/mergeAllChunksOnShard/#std-label-mergeability">
         mergeable
        </a>
        chunks for a given collection on a shard.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/mergeChunks/#mongodb-dbcommand-dbcmd.mergeChunks">
         <code class="leafygreen-ui-1l06pbn">
          mergeChunks
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Provides the ability to combine chunks on a single shard.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/refineCollectionShardKey/#mongodb-dbcommand-dbcmd.refineCollectionShardKey">
         <code class="leafygreen-ui-1l06pbn">
          refineCollectionShardKey
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Refines a collection's shard key by adding a suffix to the
existing key.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/removeShard/#mongodb-dbcommand-dbcmd.removeShard">
         <code class="leafygreen-ui-1l06pbn">
          removeShard
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Starts the process of removing a shard from a sharded cluster.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/removeShardFromZone/#mongodb-dbcommand-dbcmd.removeShardFromZone">
         <code class="leafygreen-ui-1l06pbn">
          removeShardFromZone
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Removes the association between a shard and a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zone">
         zone
        </a>
        . Supports configuring
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/zone-sharding/#std-label-zone-sharding">
         zones
        </a>
        in sharded clusters.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/reshardCollection/#mongodb-dbcommand-dbcmd.reshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          reshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Initiates a
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-reshard-a-collection/#std-label-sharding-resharding">
          resharding operation
         </a>
         to change the
shard key for a collection, changing the distribution of your data.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           5.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setAllowMigrations/#mongodb-dbcommand-dbcmd.setAllowMigrations">
         <code class="leafygreen-ui-1l06pbn">
          setAllowMigrations
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Prevents the start of new
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-data-partitioning/#std-label-sharding-chunk-migration-automatic">
         automatic migrations
        </a>
        on a
collection, prevents in-flight
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharding-data-partitioning/#std-label-sharding-chunk-migration-manual">
         manual migrations
        </a>
        from
committing, and excludes the collection from new balancer rounds.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/shardCollection/#mongodb-dbcommand-dbcmd.shardCollection">
         <code class="leafygreen-ui-1l06pbn">
          shardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Enables the sharding functionality for a collection, allowing the collection to be sharded.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/shardingState/#mongodb-dbcommand-dbcmd.shardingState">
         <code class="leafygreen-ui-1l06pbn">
          shardingState
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Reports whether the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
         <code class="leafygreen-ui-1l06pbn">
          mongod
         </code>
        </a>
        is a member of a sharded cluster.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/split/#mongodb-dbcommand-dbcmd.split">
         <code class="leafygreen-ui-1l06pbn">
          split
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Creates a new
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-chunk">
         chunk
         <!-- -->
         .
        </a>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/transitionFromDedicatedConfigServer/#mongodb-dbcommand-dbcmd.transitionFromDedicatedConfigServer">
         <code class="leafygreen-ui-1l06pbn">
          transitionFromDedicatedConfigServer
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Configures a dedicated config server to run as a config shard.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           8.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/transitionToDedicatedConfigServer/#mongodb-dbcommand-dbcmd.transitionToDedicatedConfigServer">
         <code class="leafygreen-ui-1l06pbn">
          transitionToDedicatedConfigServer
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Configures a config shard to run as a dedicated config server.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           8.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/unsetSharding/#mongodb-dbcommand-dbcmd.unsetSharding">
         <code class="leafygreen-ui-1l06pbn">
          unsetSharding
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <em>
         Removed in MongoDB 5.0.
        </em>
        Internal command that affects
connections between instances in a MongoDB deployment.
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/unshardCollection/#mongodb-dbcommand-dbcmd.unshardCollection">
         <code class="leafygreen-ui-1l06pbn">
          unshardCollection
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <p class="leafygreen-ui-1kp3ins">
         Unshards an existing sharded collection and moves the collection
data onto a single shard. When you unshard a collection,
the collection cannot be partitioned across multiple
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-shard">
          shards
         </a>
         and the
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-shard-key">
          shard key
         </a>
         is removed.
        </p>
        <div>
         <p>
          <em>
           New
           <!-- -->
           in version
           <!-- -->
           8.0
          </em>
          .
         </p>
        </div>
       </div>
      </div>
     </td>
    </tr>
    <tr class="leafygreen-ui-15dvrnp">
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/updateZoneKeyRange/#mongodb-dbcommand-dbcmd.updateZoneKeyRange">
         <code class="leafygreen-ui-1l06pbn">
          updateZoneKeyRange
         </code>
        </a>
       </div>
      </div>
     </td>
     <td class="leafygreen-ui-1drjk7h">
      <div class="leafygreen-ui-1n4j8xf">
       <div>
        Adds or removes the association between a range of sharded data and a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zone">
         zone
        </a>
        . Supports configuring
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/zone-sharding/#std-label-zone-sharding">
         zones
        </a>
        in sharded clusters.
       </div>
      </div>
     </td>
    </tr>
   </tbody>
  </table>
 </div>
</section>
