Docs Menu

Sharding Commands

Note

For details on specific commands, including syntax and examples, click on the specific command to go to its reference page.

Name
Description

Aborts a resharding operation.

New in version 5.0.

Adds a shard to a sharded cluster.
Associates a shard with a zone. Supports configuring zones in sharded clusters.

Returns information on whether the chunks of a sharded collection are balanced.

New in version 4.4.

Starts a balancer thread.
Returns information on the balancer status.
Stops the balancer thread.
Internal command that validates index on shard key.
Clears the jumbo flag for a chunk.
Removes orphaned data with shard key values outside of the ranges of the chunks owned by a shard.

Cleans up a failed resharding operation.

New in version 5.0.

Forces a resharding operation to block writes and complete.

New in version 5.0.

Enables sharding on a specific database.
Forces a mongod/mongos instance to update its cached routing metadata.
Internal command that reports on the state of a sharded cluster.
Internal command that returns the config server version.
Verifies that a process is a mongos.
Returns a list of configured shards.
Deprecated internal command. See splitVector.
Internal command that migrates chunks between shards.
Reassigns the primary shard when removing a shard from a sharded cluster.
Provides the ability to combine chunks on a single shard.

Refines a collection's shard key by adding a suffix to the existing key.

New in version 4.4.

Starts the process of removing a shard from a sharded cluster.
Removes the association between a shard and a zone. Supports configuring zones in sharded clusters.

Initiates a resharding operation to change the shard key for a collection, changing the distribution of your data.

New in version 5.0.

Internal command to sets the config server version.
Enables the sharding functionality for a collection, allowing the collection to be sharded.
Reports whether the mongod is a member of a sharded cluster.
Creates a new chunk.
Internal command to split chunk. Instead use the methods sh.splitFind() and sh.splitAt().
Internal command that determines split points.
Removed in MongoDB 5.0. Internal command that affects connections between instances in a MongoDB deployment.
Adds or removes the association between a range of sharded data and a zone. Supports configuring zones in sharded clusters.
Give Feedback
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.