-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lvm: Enhancements for LVM2 RAID support #730
lvm: Enhancements for LVM2 RAID support #730
Conversation
Can one of the admins verify this patch? |
I guess I need to write some tests... :-) |
Jenkins, ok to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The biggest issue I have with this is the DBus plugin -- we want to have the same functionality in both (even though UDisks doesn't use the DBus plugin). Good news is that it looks like it has all the properties we need (SyncPercent
and Health
and Devices
for LVs and Hidden
for PVs). Bad news is that it doesn't provide a function for Repair, but I can live with that (but we still need an "empty" function to return the "not implemented" error in the plugin, it wouldn't be the first and we can add it to lvmdbusd later).
Yes please :-) |
Ah, I have ignored it completely. Should we agree on how we want to extend the "lvm" plugin exactly, and then I port that over to the "lvm-dbus" plugin? |
eb57a36
to
a5f9847
Compare
While writing the test, I noticed wait_for_sync, which waits for copy_percent to reach 100... What is the relation between copy_percent and sync_percent? Do we maybe only need one? |
Good question, we probably need to ask someone from the LVM team. The description for
|
Ok, good point. Let's deal with the DBus plugin later. |
I am collecting questions here: cockpit-project/cockpit#17226 (comment), I'll add this to the list. For now, let's assume they are the same (as far as our use case is concerned). |
5cdb01b
to
280ce76
Compare
I now see that |
5a397ed
to
88877fb
Compare
I think the test is failing because |
88877fb
to
c7e8ed7
Compare
@vojtechtrefny, can you point to an example of such a empty function in lvm-dbus.c ? I can't find any... However, bd_lvm_devices_add in lvm-dbus.c spawns "lvmdevices". Should we maybe just spawn "lvconvert --repair" in lvm-dbus.c as well?
Maybe lvmdbusd can just call libblockdev for that. :-) |
|
96d9e34
to
72b8bb7
Compare
I think I have reached a stable point here. I have squashed the FIXUPs, please have another look! |
Yes, I had the same issue few months ago 4562941
I actually fixed the missing functionality in lvm-dbus few months ago. Example from the older code: https://github.com/storaged-project/libblockdev/blob/2.26-1/src/plugins/lvm-dbus.c#L3529 it simply calls
I don't think it's necessary. UDisks forces the CLI plugin so it will never use the DBus one, we can deal with this in the future.
+1 Everyone loves circular dependencies :-)
We use
Great, I'll try to do the review as soon as possible. |
I copy/pasted the code from lvm.c and it seems to work. shrug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general. Let's wait for other opinions about the LVM DBus plugin repair support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the bold move!
72b8bb7
to
25d22ed
Compare
cc1bc1b
to
863a4b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you. If this is the final version, I think we can merge it now.
863a4b7
to
25e8336
Compare
This exposes the "missing" attribute of PVs and allows for repairs.
LVM RAID raid1 causes kernel panic on latest RHEL/CentOS 9, see https://bugzilla.redhat.com/show_bug.cgi?id=2079942 for details.
dad0235
to
1ddad8f
Compare
Follow-up for storaged-project#730 adding support for running repair to the DBus plugin. Support in LVM DBus plugin is currently posted for review.
This exposes the health status etc and allows for repairs.
This is part of supporting LVM2 RAID in Cockpit:
storaged-project/udisks#969
cockpit-project/cockpit#17226
There is a first demo already: https://www.youtube.com/watch?v=86veT8waLZE
Please check the cockpit PR for updates.