Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to add a new directory to the data directory, but I found that STS does not automatically create PVC. What do I need to do #732

Open
xiongmozhou opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@xiongmozhou
Copy link

xiongmozhou commented Nov 15, 2024

conf.yaml

  cassandra:
    serverVersion: "4.0.1"
    datacenters:
      - metadata:
          name: dc1
        size: 3
        storageConfig:
          cassandraDataVolumeClaimSpec:
            storageClassName: open-local-lvm
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 5Gi
          additionalVolumes:
            - name: data01
              mountPath: /opt/tmp01
              pvcSpec:
                storageClassName: open-local-lvm
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
            - name: data02
              mountPath: /opt/tmp02
              pvcSpec:
                storageClassName: open-local-lvm
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 2Gi
            - name: data03
              mountPath: /opt/tmp03
              pvcSpec:
                storageClassName: open-local-lvm
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 3Gi
        config:
          jvmOptions:
            heapSize: 512M
          cassandraYaml:
            cdc_enabled: true
            counter_write_request_timeout_in_ms: 10000
            data_file_directories:
              - /opt/tmp01
              - /opt/tmp02
              - /opt/tmp03

The storage configuration for data03 was added later. After I applied it again, I found that data03 PVC was not created and the pod restart failed

log:

Warning FailedCreate 5m20s (x17 over 10m) statefulset-controller create Pod demo-dc1-default-sts-2 in StatefulSet demo-dc1-default-sts failed error: Pod "demo-dc1-default-sts-2" is invalid: [spec.containers[0].volumeMounts[2].name: Not found: "data03", spec.containers[2].volumeMounts[2].name: Not found: "data03"]

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: CASS-80

@xiongmozhou xiongmozhou added the question Further information is requested label Nov 15, 2024
@burmanm burmanm self-assigned this Nov 15, 2024
@burmanm burmanm transferred this issue from k8ssandra/k8ssandra-operator Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants