https://rancher.com/ logo
#vsphere
Title
# vsphere
a

adamant-kite-43734

06/22/2022, 5:11 PM
This message was deleted.
b

brave-country-95392

06/22/2022, 5:29 PM
@modern-television-79263 Forgot to say, I am trying offline volume expansion. The volume is not mounted on any pod. From all the docs I’ve seen, offline expansion is supported on 6.7, while online is only supported on 7+
m

modern-television-79263

06/22/2022, 5:30 PM
Ah! Then I’m out of ideas. :(
😕 1
a

agreeable-oil-87482

06/24/2022, 1:31 PM
Have you checked the CSI pod logs?
b

brave-country-95392

06/24/2022, 1:32 PM
Yes, can’t find anything unusal, no errors, no warnings.
a

agreeable-oil-87482

06/24/2022, 1:37 PM
Is this PV mounted to a Windows node?
b

brave-country-95392

06/24/2022, 1:46 PM
No, all nodes are Ubuntu 20.04 LTS
The PV is not mounted on any node atm, I am trying to perform offline expansion.
a

agreeable-oil-87482

06/24/2022, 1:50 PM
So I assume you're trying to expand it by directly modifying the PVC object with a new size?
b

brave-country-95392

06/24/2022, 1:50 PM
Yes, exactly
a

agreeable-oil-87482

06/24/2022, 1:54 PM
I assume you're doing something like
kubectl patch pvc test2 -p '{"spec": {"resources": {"requests": {"storage": "6Gi"}}}}'
or similar?
b

brave-country-95392

06/24/2022, 2:04 PM
Yes, that’s exactly how I’m doing it
a

agreeable-oil-87482

06/24/2022, 2:12 PM
can you do a kubectl get pv <name> -o yaml, please?
b

brave-country-95392

06/24/2022, 2:17 PM
Here it is
Copy code
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pvc-9db54cee-126d-4123-b835-8747bc266692
  uid: 60fc2638-abd9-4201-9ec2-0f8e91f1b6d1
  resourceVersion: '249642158'
  creationTimestamp: '2022-06-22T08:42:51Z'
  annotations:
    <http://pv.kubernetes.io/provisioned-by|pv.kubernetes.io/provisioned-by>: <http://csi.vsphere.vmware.com|csi.vsphere.vmware.com>
  finalizers:
    - <http://kubernetes.io/pv-protection|kubernetes.io/pv-protection>
    - external-attacher/csi-vsphere-vmware-com
status:
  phase: Bound
spec:
  capacity:
    storage: 5Gi
  csi:
    driver: <http://csi.vsphere.vmware.com|csi.vsphere.vmware.com>
    volumeHandle: f327a6e2-42e2-423c-bc18-2c1c3bbca11c
    fsType: ext4
    volumeAttributes:
      <http://storage.kubernetes.io/csiProvisionerIdentity|storage.kubernetes.io/csiProvisionerIdentity>: <http://1655887279217-8081-csi.vsphere.vmware.com|1655887279217-8081-csi.vsphere.vmware.com>
      type: vSphere CNS Block Volume
  accessModes:
    - ReadWriteOnce
  claimRef:
    kind: PersistentVolumeClaim
    namespace: test
    name: test2
    uid: 9db54cee-126d-4123-b835-8747bc266692
    apiVersion: v1
    resourceVersion: '249639843'
  persistentVolumeReclaimPolicy: Retain
  storageClassName: vsphere
  volumeMode: Filesystem
a

agreeable-oil-87482

06/24/2022, 2:19 PM
Hmm, and the PV isn't bound to anything at the moment?
b

brave-country-95392

06/24/2022, 2:21 PM
If by bound you mean mounted on a pod, no, it’s not
a

agreeable-oil-87482

06/24/2022, 2:23 PM
Interesting, that's all you need from what I've gathered from the docs. Does a resizer pod spin up when you try and expand the volume?
b

brave-country-95392

06/24/2022, 2:26 PM
No, it doesn’t. Wasn’t even aware of such a thing 😅
a

agreeable-oil-87482

06/24/2022, 2:28 PM
That might be specific to 7.0 tbh
b

brave-country-95392

06/24/2022, 2:42 PM
Ok, I figured out the issue. I needed to set
csiController.csiResizer.enabled=true
on the CSI Helm chart, default is disabled and missed the setting on first installed.
Thanks for your help 🙂
a

agreeable-oil-87482

06/24/2022, 2:42 PM
And you reran the expansion and it works?
b

brave-country-95392

06/24/2022, 2:43 PM
Yeah, didn’t even have to reran it, after the resizer was enabled it picked the PVC as needing to resize and resized it.
a

agreeable-oil-87482

06/24/2022, 2:43 PM
I provided no help, you sorted it all out by yourself 😄
m

modern-television-79263

06/24/2022, 3:30 PM
Good news all around. :)