Solved

Extend PVC of logging service

  • 25 February 2022
  • 4 comments
  • 268 views

Userlevel 4
Badge +1

Hi All, 

I am trying to extend logging service pvc but it is failing:

 helm get values k10 --output yaml --namespace=kasten-io > k10_val.yaml && \
>     helm upgrade k10 kasten/k10 --namespace=kasten-io -f k10_val.yaml \
>     --set global.persistence.logging.size=40Gi \
>     --set global.persistence.job.size=40Gi --version 4.5.9
Error: UPGRADE FAILED: cannot patch "logging-pv-claim" with kind PersistentVolumeClaim: persistentvolumeclaims "logging-pv-claim" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize
 

please your advice

regards,

ALy

 

icon

Best answer by FRubens 25 February 2022, 12:59

View original

4 comments

Userlevel 4
Badge +2

Hello @Aly Idriss ,

 

Thank you for contact Kasten by Veeam and using our community!

I would recommend to check the setup of your StorageClass, K8s allows PVC to be expanded only when the StorageClass has "allowExpansion" set to true according with K8s documentation:

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims

It would be set as true by default on CSI driver, but I am not sure which Storage are you using with K10.


Regards
Fernando R.
Kasten Support

Userlevel 4
Badge +1

Hi Fernando,

thanks for the updates,

I am using K3s local-path storage class, which is not in the list

I successfully updated the storage class with “allowVolumeExpansion: true” , and I updated Kasten  PVC with the above command successfully.

but it seems that the PVC is not extended :

logging-pv-claim    Bound    pvc-81467a48-56f0-4073-9d4e-d3430fd74aec   20Gi       RWO            local-path     34d

 

what do you think?

BR,

Aly

 

Userlevel 4
Badge +2

Hello @Aly Idriss ,

Looks like there are some issues regarding resize of a created PVC on k3s Local Path Provisioner, so after enabling "allowVolumeExpansion" the command should work as it did for you, but the real size will not show, according to the PR/docs since Local Path Provisioner doesn't take PVC size into consideration, there is no quota/enforcement for the volume size so it can have a bigger size than it showing on PVC being limited by the system disk size, but unfortunately looks like the PR did not address the PVC size status, it will still show the original amount.

Please take a look in the links bellow for further details related to this:

https://github.com/rancher/local-path-provisioner/issues/190
https://github.com/rancher/local-path-provisioner/pull/189
https://rancher.com/docs/k3s/latest/en/storage/

Regards

Fernando R.

Kasten by Veeam support.

Userlevel 4
Badge +1

Thank you Fernando, yes I think it is my SC limitation

BR,

Ali

Comment