How to Migrate Locally Mounted Data to a New Node When Migrating PD Pod

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于迁移pd pod,本地挂载数据如何迁移到新节点

| username: atidat

Version v6.2.0, according to the documentation 维护 TiDB 集群所在的 Kubernetes 节点 | PingCAP 文档中心
it is possible to migrate the PD pod, but how is the data on the local storage disk migrated to the new node? Or is the data rebuilt on the new node?

| username: xfworld | Original post link

The documentation describes the following steps:

  1. If the PD node you want to migrate is the leader, first transfer the leader’s responsibilities to other nodes (to ensure overall service availability).
  2. Then, take the PD node offline and scale it down.
  3. After that, scale up a new PD node. Once the new node has completed synchronization, you can transfer the leader’s responsibilities back.

These steps cannot be skipped, otherwise, it may lead to service unavailability or potential data loss.

| username: atidat | Original post link

Yes, so essentially it follows the scaling solution. The new pod data is synchronized from the leader PD pod to the new node’s pod, rather than migrating (copying) data from the old node to the current node.

| username: xfworld | Original post link

Of course, it’s the nature of being distributed.

| username: xfworld | Original post link

However, the storage capabilities of K8S can unlock more possibilities. It’s better to refer to the documentation and practice more, which will make things clearer.

The essence remains the same.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.