Skip to content

Commit 2a56156

Browse files
authored
docs(volumes): updates JBOD reassignment procedure to include volume cleanup step (#11398)
Signed-off-by: prmellor <pmellor@redhat.com>
1 parent 8220c7d commit 2a56156

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

documentation/modules/cruise-control/proc-cruise-control-moving-data.adoc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,61 @@ In this example, the log directories for volumes 1 and 2 no longer have partitio
334334
]
335335
}
336336
----
337+
338+
. To prevent empty volumes from being used in future rebalances or topic allocations, update the configuration and remove the associated persistent volume claims (PVCs).
339+
340+
.. Update the node pool configuration to exclude the volumes.
341+
+
342+
WARNING: Before making changes, verify that all partitions have been successfully moved using `kafka-log-dirs.sh`.
343+
Removing volumes prematurely can cause data loss.
344+
+
345+
In this example, volumes 1 and 2 are removed, and only volume 0 is retained:
346+
+
347+
.Updated node pool configuration with single volume JBOD storage
348+
[source,yaml,subs=attributes+]
349+
----
350+
apiVersion: {KafkaNodePoolApiVersion}
351+
kind: KafkaNodePool
352+
metadata:
353+
name: pool-a
354+
labels:
355+
strimzi.io/cluster: my-cluster
356+
spec:
357+
replicas: 3
358+
roles:
359+
- broker
360+
storage:
361+
type: jbod
362+
volumes:
363+
- id: 0
364+
type: persistent-claim
365+
size: 2000Gi
366+
deleteClaim: false
367+
# ...
368+
----
369+
370+
.. Delete the unused PVCs.
371+
+
372+
PVCs are named using the format `data-<id>-<kafka_cluster_name>-kafka-<pod_id>`.
373+
You can list them using:
374+
+
375+
[source,shell,subs="+quotes"]
376+
----
377+
kubectl get pvc -n my-project
378+
----
379+
+
380+
Then delete the unused PVCs:
381+
+
382+
[source,shell,subs="+quotes"]
383+
----
384+
kubectl delete pvc data-<id>-<kafka_cluster_name>-kafka-<pod_id> -n my-project
385+
----
386+
+
387+
NOTE: Deleting a PVC removes the underlying storage unless `deleteClaim: false` is set in the volume configuration.
388+
389+
.. (Optional) Delete the helper pod used earlier:
390+
+
391+
[source,shell]
392+
----
393+
kubectl delete pod helper-pod -n my-project
394+
----

0 commit comments

Comments
 (0)