New in version 3.4.
Removes the association between a zone and a shard.
Parameter Type Description
string The name of the shard from which to remove association with the
string The name of the zone from which to remove assocation with the
sh.removeShardFromZone()when connected to a
sh.removeShardFromZone() does not remove ranges associated with the
To completely remove a zone from the cluster, you must run
sh.removeShardFromZone() on each shard associated with the zone.
If the shard specified is the last shard associated with the zone, you
must ensure there are no remaining ranges associated with the zone. Use
updateZoneKeyRange to remove any existing ranges associated to
the zone before running
See the zone manual page for more information on zones in sharded clusters.
Removing the association between a zone and a shard removes the constraints keeping chunks covered by the zone on the shard. During the next balancer round, the balancer may migrate chunks that previously covered by the zone.
See the the sharded cluster balancer manual page for more information on how migrations work in a sharded cluster.
For sharded clusters running with authentication, you must authenticate as a user whose privileges include:
config.shardscollection or the
config.tagscollection or the