Altinity / Altinity/clickhouse-operator

How to Prevent Metadata Loss When Removing PV Used for Default Disk

Open
#1,700 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.6k
Forks
574
Avg merge
8d 6h
Merged PRs (30d)
6

Description

We’re running into an issue where the existing PVC is too large and we need to decrease our storage to reduce COGs. Our plan is:

  1. Provision a new, smaller PV
  2. Migrate all data from the old PV to the new one
  3. Delete the oversized PV

For step 1 & 2, we achieve them by following these two:

Now, for step 3 (removing the old PV), as mentioned in https://github.com/Altinity/clickhouse-operator/issues/1381, changing default disk would cause table metadata loss.

Does anyone have a recommended, safe procedure for deleting the old PV (especially the one used for default disk) without losing table metadata?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #1381 and the linked Altinity knowledge-base procedure for moving tables between devices. A useful outcome would be a documented, verified procedure for deleting the old PV, including how to avoid losing table metadata when it was used as the default disk.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
databases, infrastructure
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.