-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
added writecache causes topolvm to be unable to find an LV it has created #1003
Comments
Thank you for your report. I'm looking into it. |
I can reproduce this by this commit 144c37e. topolvm/internal/lvmd/vgservice.go Lines 75 to 78 in 3305f75
My quick fix is to use the attr field instead of the pool field. 7b15db5 If you try to fix this, feel free to send a PR. To test it, add a test file in |
* add `C` to VolumeType const * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin)
* add `C` to VolumeType const * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin)
* add `C` to VolumeType const * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin) * add tests for cached LVs
* add `C` to VolumeType and OpenTarget consts * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin) * add tests for cached LVs
* add `C` to VolumeType and OpenTarget consts * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin) * add tests for cached LVs
* add `C` to VolumeType and OpenTarget consts * `lv.IsThin` should check LV attrs for thin (e.g., cached LVs have a pool but are not necessarily thin) * add tests for cached LVs Signed-off-by: guppy0130 <guppy0130@yahoo.com>
Co-authored-by: Yuji Ito <llamerada-jp@users.noreply.github.com>
Co-authored-by: Yuji Ito <llamerada-jp@users.noreply.github.com>
support cached volumes, fixes #1003
Describe the bug
Created a raid1 LV via topolvm for a PVC. Later on, manually added a writecache to that LV outside of topolvm. After adding the writecache, topolvm can no longer find the LV. After removing the writecache, topolvm can find the LV again.
Environments
ghcr.io/topolvm/topolvm-with-sidecar:0.36.0
PRETTY_NAME="Ubuntu 24.04.1 LTS"
To Reproduce
Steps to reproduce the behavior:
--type raid 1
LVs to be created (e.g., https://github.com/guppy0130/kubernetes/blob/99063376b1232b90164c31137f5db627838dd7be/topolvm/values.yaml#L138)systemctl stop k3s
systemctl start k3s
Expected behavior
Since the name of the LV didn't change, topolvm should be able to find the LV and mount it at step 6
Additional context
this is what I did for step 4:
this is after step 4:
topoLVM should be able to see it though; assuming that topoLVM runs this to get all the LVs:
this JSON blob is inside that report (I've truncated it because the other LVs aren't relevant):
the log from my
topolvm-node-*
container:the stacktrace, extracted from the JSON blob and formatted a little better:
and some stuff from journal (which says more of the same stuff, not finding the LV)
after I un-writecache the LV, the output of the previous
lvm fullreport
(similarly truncated and formatted):I suspect it might be due to the missing
C
in this rune:topolvm/internal/lvmd/command/lvm_lv_attr.go
Lines 32 to 54 in 00c6d96
related docs: https://github.com/lvmteam/lvm2/blob/main/man/lvs.8_end#L6
related source: https://github.com/lvmteam/lvm2/blob/5ef958704c82c45a6bd8215d920e4366c0c5e1bd/lib/metadata/lv.c#L1333-L1334
happy to file a PR to add to the rune (?) + related tests, just let me know if that's desirable
The text was updated successfully, but these errors were encountered: