Altinity / Altinity/clickhouse-operator
How to Prevent Metadata Loss When Removing PV Used for Default Disk
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:
- Provision a new, smaller PV
- Migrate all data from the old PV to the new one
- Delete the oversized PV
For step 1 & 2, we achieve them by following these two:
- https://github.com/Altinity/clickhouse-operator/issues/1381
- https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-moving-table-to-another-device./
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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