Moving a static group

To decommission a YDB cluster host that accommodates a part of a static group, you need to move the group to another host.

Warning

The YDB cluster might become unavailable as a result of an invalid sequence of actions or a configuration error.

As an example, let's take a YDB cluster where you set up and launched a static node on a host with node_id:1. This node serves a part of the static group.

Fragment of the static group configuration:

...
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 to the cluster a new host with node_id:10 and deployed a static node in it.

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

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

    Note

    YDB cluster is fault tolerant. Temporarily shutting down a node doesn't affect the cluster availability. For details, see YDB cluster topology.

  2. In the config.yaml configuration file, change node_id, replacing the ID of the removed host by the ID of the added host:

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

    Edit the path and pdisk_category for the disk if these parameters are different on the host with node_id: 10.

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

  4. Use the rolling-restart procedure to restart all the static cluster nodes.

  5. Go to the Embedded UI monitoring page and make sure that the VDisk of the static group is visible on the target physical disk and its replication is in progress. For details, see Monitoring static groups.

  6. Use the rolling-restart procedure to restart all the dynamic cluster nodes.