Safe restart and shutdown of nodes

Stopping/restarting a YDB process on a node

To make sure that the process is stoppable, follow these steps.

  1. Access the node via SSH.

  2. Execute the command

    1. kikimr cms request restart host {node_id} --user {user} --duration 60 --dry --reason 'some-reason'

    Safe restart and shutdown of nodes - 图1

    If the process is stoppable, you’ll see ALLOW.

  3. Stop the process

    1. sudo service kikimr stop

    Safe restart and shutdown of nodes - 图2

  4. Restart the process if needed

    1. sudo service kikimr start

    Safe restart and shutdown of nodes - 图3

Replacing equipment

Before replacing equipment, make sure that the YDB process is stoppable.
If the replacement is going to take a long time, first move all the VDisks from this node and wait until replication is complete.
After replication is complete, you can safely shut down the node.

To make sure that disabling the dynamic node doesn’t affect query handling, drain the tablets from this node first.

Go to the Hive web-viewer page.
Click “View Nodes” to see a list of all nodes.

Before disabling the node, first disable the transfer of tablets through the Active button, then click Drain, and wait for all the tablets to be moved away.