Static Group Move

Warning

This article describes working with YDB clusters using configuration V1. Configuration V1 was the main way to configure clusters managed by YDB versions below v25.1. Starting from version v25.1, YDB supports configuration V2, which is the recommended way to configure YDB clusters with version v25.1 and above. For clusters using configuration V2, the instructions in this article are not applicable.

If your cluster has already been updated to version v25.1 or above but still uses configuration V1, it is recommended to plan migration to configuration V2, as support for configuration V1 will be discontinued in future versions of YDB.

If you need to decommission a YDB cluster host that contains part of the static group, you need to move it to another host.

Warning

Incorrect sequence of actions or configuration errors can lead to YDB cluster unavailability.

As an example, consider a YDB cluster where a static node is configured and running on the host with node_id:1. This node serves part of the static group.

Static group configuration fragment:

...
blob_storage_config:
  ...
  service_set:
    ...
    groups:
      ...
      rings:
        ...
        fail_domains:
        - vdisk_locations:
          - node_id: 1
            path: /dev/vda
            pdisk_category: SSD
        ...
      ...
    ...
  ...
...

To replace node_id:1, we added a new host with node_id:10 to the cluster and deployed a static node on it.

To move part of the static group from host node_id:1 to node_id:10:

  1. Stop the cluster static node on the host with node_id:1.

    Note

    A YDB cluster is fault-tolerant. Temporary node shutdown does not lead to cluster unavailability. For more details, see YDB cluster topology.

  2. In the configuration file config.yaml, change the node_id value, replacing the identifier of the host being removed with the identifier of the host being added:

    ...
    blob_storage_config:
      ...
      service_set:
        ...
        groups:
          ...
          rings:
            ...
            fail_domains:
            - vdisk_locations:
              - node_id: 10
                path: /dev/vda
                pdisk_category: SSD
            ...
          ...
        ...
      ...
    ...
    

    Change the path and disk pdisk_category if they differ on the host with node_id: 10.

  3. Update the configuration files config.yaml for all cluster nodes, including dynamic ones.

  4. Using the rolling-restart procedure, restart all static cluster nodes.

  5. Go to the Embedded UI monitoring page and ensure that the static group VDisk appeared on the target physical disk and is replicating. For more details, see Monitoring static groups.

  6. Using the rolling-restart procedure, restart all dynamic cluster nodes.