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:
-
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.
-
In the
config.yaml
configuration file, changenode_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
andpdisk_category
for the disk if these parameters are different on the host withnode_id: 10
. -
Update the
config.yaml
configuration files for all the cluster nodes, including dynamic nodes. -
Use the rolling-restart procedure to restart all the static cluster nodes.
-
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.
-
Use the rolling-restart procedure to restart all the dynamic cluster nodes.