-
Notifications
You must be signed in to change notification settings - Fork 142
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 #969
Conversation
Can one of the admins verify this patch? |
ae2eaf1
to
f29b8dc
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.
I know this is pretty much WIP, just a couple of notes that caught my eye.
Generally it looks good so far!
resynching. A value of 1.0 corresponds to fully synched and | ||
indicates that no synch operation is in progress. | ||
--> | ||
<property name="CopyRatio" type="d" access="read"/> |
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.
I'm wondering whether it's worth adding a note that this concerns LVM RAID scenarios only. Might be perhaps confusing to newcomers trying to find their way through the interface with so many puzzling properties.
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.
Is this true, however? Maybe other operations like pvmove or lvconvert also use this. AFAIK, "Copy%" predates raid support in LVM2. But shrug. I'll document it as only applying toRAID, and make sure in the code that others have always 1.0 as the value.
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.
I have no idea honestly :-) @vojtechtrefny?
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.
Yes, the copy_sync
/sync_percent
LV property is also used for pvmove.
Thanks a lot for having a look! Yes, there is lots of refactoring to be done. There are now three methods that take lists of PVs, and they should all share code for turning them into a strv for libblockdev. |
32f98fb
to
39a00f3
Compare
Oh, they don't. I have to experiment with this. |
Yes, they do. Maybe we should ask lvm2 to make this work before we support raid thin pools. |
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.
Couple more minor things spotted, nothing major. Still looks good otherwise.
For RAID thin pools we need to manually create the two RAID LVs for metadata and data and then use |
0a389d2
to
35aa780
Compare
I no longer think this will happen. The experience when using "%PVS" for anything but "100%PVS" is not good: "50%PVS" does not give you something that is half the size of "100%PVS":
A raid5 on "100%PVS" is 984 megs, but with "50%PVS" it is 744 megs instead of the expected 490ish megs. This is because "%PVS" doesn't work well with layouts that require much more space on PVs than they provide on the resulting LV. "100%PVS" in the case above is asking for a LV of size 1500ish megs, but lvcreate flips on a special mode and makes one that is as large as it can be, which turns out to be 980 megs. "50%PVS" asks for half of 1500 = 750, which is possible, so we get that. So exposing a "%PVS" slider with its current semantics doesn't make sense. And if we have to change LVM2 anyway, we should change it to report the maximum possible size in a dry-run or test mode. |
0e338e9
to
503f910
Compare
I'd say "yes". I at least don't know how this all will work for pools, with all their meta data etc. Maybe we'll expose lvconvert in the API? So I wouldn't worry about that yet at all. |
503f910
to
48bb4a1
Compare
Jenkins, ok to test. |
e8ce55a
to
b01d743
Compare
b01d743
to
2de5f59
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.
Thanks for the fixes. This looks good to me in its current form.
@mvollmer: do you plan any further changes to this? There are some design questions from you above, I don't have much more to say to that.
As we're close to the udisks-2.10.0
release, the API in this pull request will get public and fozen. If you think it might still need another iteration, we may postpone this to 2.11.0
.
I am happy with that. Thanks a lot! |
This is part of supporting LVM2 RAID in Cockpit: cockpit-project/cockpit#17226