hobby-kube / guide

Kubernetes clusters for the hobbyist.
MIT License
5.57k stars 258 forks source link

Unable to resize persistent volume with rook #90

Open faejr opened 3 years ago

faejr commented 3 years ago

I was playing around with this and noticed that you can't dynamically resize a rook-block volume. Perhaps this is at least worth mentioning in the guide, or to find a way to do so?

error: persistentvolumeclaims "storage" could not be patched: persistentvolumeclaims "storage" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize
faejr commented 3 years ago

I decided to play around with this and completely uninstalled rook and then installed it again. But now it seems that the rook-ceph-mon pod is no longer getting started by the operator. Any idea?

pstadler commented 3 years ago

Hey there.

Could it be that your storage device is already formatted and rook is unable to claim it?

P.S. Even though you seem to have deleted your comment regarding allowVolumeExpansion, I added it to the manifest. Thanks for the hint.

faejr commented 3 years ago

Thanks for the reply! That's actually a good thought, I didn't think to recreate the storage device.

The reason I delete my comment about allowVolumeExpansion was that it wasn't working even after adding that. But what I found is that you also should add the following parameter to the storage class to allow it to expand.

csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook

However I wasn't able to properly try it out since I haven't gotten rook to work again. I'll try your suggestion and get back

pstadler commented 3 years ago

oh, I see. this only works with the flex driver. I just pushed the changes to use the parameters you mentioned.

faejr commented 3 years ago

Seems like rook still doesn't want to work after recreating the storage device. I guess it may have left some other stray files on the systems.

pstadler commented 3 years ago

Unfortunately, this is not easy to debug. Maybe this could help? https://github.com/rook/rook/blob/master/Documentation/ceph-common-issues.md#failing-mon-pod

faejr commented 3 years ago

After researching and recreating my whole cluster to get rook working it appears that expanding a volume still doesn't work. Unfortunate

Warning  ExternalExpanding      17s    volume_expand Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.