guide icon indicating copy to clipboard operation
guide copied to clipboard

Unable to resize persistent volume with rook

Open faejr opened this issue 4 years ago • 7 comments

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 avatar Jul 28 '21 09:07 faejr

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?

faejr avatar Jul 28 '21 18:07 faejr

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.

pstadler avatar Jul 28 '21 18:07 pstadler

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

faejr avatar Jul 28 '21 18:07 faejr

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

pstadler avatar Jul 28 '21 18:07 pstadler

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.

faejr avatar Jul 28 '21 19:07 faejr

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

pstadler avatar Jul 28 '21 19:07 pstadler

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.

faejr avatar Jul 29 '21 11:07 faejr