sh.setBalancerState()

sh.setBalancerState(state)
Parameters:
  • state (boolean) – true enables the balancer if disabled, and false disables the balancer.

Enables or disables the balancer. Use sh.getBalancerState() to determine if the balancer is currently enabled or disabled and sh.isBalancerRunning() to check its current state.

MongoDB Manual 2.4

Formats

About MongoDB

MongoDB Ecosystem

MongoDB Resources