lvm-localpv
lvm-localpv copied to clipboard
Host pv/vg/lv information is outdated
What steps did you take and what happened:
If i create a k8s pv using openebs-localpv, the lv won't appear in the host lvs command and the size of the vg wont be updated in vgs command unless I explicitly run pvscan --cache
What did you expect to happen: After the k8s pv is bound , I should be able to see the information for lvs and vgs updated without needing to run any extra command.
The output of the following commands will help us better understand what's going on: (Pasting long output into a GitHub gist or other Pastebin is fine.)
kubectl logs -f openebs-lvm-localpv-controller-7b6d6b4665-fk78q -n openebs -c openebs-lvm-pluginkubectl logs -f openebs-lvm-localpv-node-[xxxx] -n openebs -c openebs-lvm-pluginkubectl get pods -n openebskubectl get lvmvol -A -o yaml
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Environment:
- LVM Driver version
- helm list
- openebs openebs-system 1 2024-04-24 19:54:30.51784991 -0300 -03 deployed openebs-3.10.0 3.10.0
- Kubernetes version (use
kubectl version): v1.29.3+k3s1 - OS (e.g. from
/etc/os-release): Flatcar Container Linux by Kinvolk 3815.2.2 (Oklo)
Hi @jsalatiel, I think using pvscan --cache is a common practice even if system has in-built capabilities of periodic refresh so that PV cache remains up to date w.r.t. any changes in storage configuration. I am not very sure if it is a kind of limitation to avoid resource overhead from lvm side or Flatcar Container Linux by Kinvolk 3815.2.2 side as it is a lightweight OS but I have seen this in ubuntu system as well.
One of the lvm-localpv user has suggested this way to avoid manual intervention -- check here. But i think It is not taken up yet.
You can create one cronjob for your use case, If you don't want to run pvscan --cache manually. That will help you in automation way.
This is apparently related to the fact that metadata caching is in place, that indicates presence of lvmetad service, which is now deprecated. Please try disabling the global/use_lvmetad config and see if that resolves this inconvenience.
I'm closing this issue based on above recommendation. Please feel free to reopen if you still face any issues w.r.t this, with relevant details that will help to consult further.