// Module included in the following assemblies:
//
// assembly-storage.adoc

[id='proc-adding-volumes-to-jbod-storage-{context}']
= Adding volumes to JBOD storage

This procedure describes how to add volumes to a Kafka cluster configured to use JBOD storage.
It cannot be applied to Kafka clusters configured to use any other storage type.

NOTE: When adding a new volume under an `id` which was already used in the past and removed, you have to make sure that the previously used `PersistentVolumeClaims` have been deleted.

.Prerequisites

* A Kubernetes cluster
* A running Cluster Operator
* A Kafka cluster with JBOD storage

.Procedure

. Edit the `spec.kafka.storage.volumes` property in the `Kafka` resource.
Add the new volumes to the `volumes` array.
For example, add the new volume with id `2`:
+
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    # ...
    storage:
      type: jbod
      volumes:
      - id: 0
        type: persistent-claim
        size: 100Gi
        deleteClaim: false
      - id: 1
        type: persistent-claim
        size: 100Gi
        deleteClaim: false
      - id: 2
        type: persistent-claim
        size: 100Gi
        deleteClaim: false
    # ...
  zookeeper:
    # ...
----

. Create or update the resource:
+
[source,shell,subs=+quotes]
kubectl apply -f _<kafka_configuration_file>_

. Create new topics or reassign existing partitions to the new disks.

.Additional resources

For more information about reassigning topics, see xref:con-partition-reassignment-{context}[].
