-
Notifications
You must be signed in to change notification settings - Fork 85
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
Allow partitioning of md arrays whose members are all disks #138
Conversation
The code looks ok to me. I think you should add docstrings on the new methods/attrs. Also, is it possible that it could end up not being partitionable and not a disk? eg. if some parents are disks and some are partitions both methods will return false. Is there protection to make sure all the parents are consistent? |
Having parents of mixed types is allowed, but precludes treating the array as partitionable or as a disk. |
Other than the nitpick abovet this looks good to me. |
I think you've got this right - if we preserve the capabilities that all of the constituents share, we should get a reasonable thing out. If any constituent doesn't have some capability, the resulting device doesn't have it. |
I found what I think is a better implementation of the second patch. What do you think? https://gist.github.com/dwlehman/d9263e8b180c189d9362 I would like to replace the second patch ("Do format handling when...") with the equivalent of the above gist (ported to populator.py instead of devicetree.py). |
The latter approach looks better to me. However, I'd change the name of the parameter to |
If we don't do it right away the device could be looked up successfully and cause confusion due to inaccurate(missing) format data. This is only needed in the places where we add a new device from a format handler. The device additions from add*Device are not vulnerable to this issue. Related: rhbz#1192004 Related: rhbz#1197582
Similarly, if all members of an existing array are partitionable the array is also partitionable. Resolves: rhbz#1197582
a3c1269
to
b07101d
Compare
When is it wrong to update the origFormat from the format when building a device tree? In other words, why do you need that parameter at all? |
It is possible to call |
Allow partitioning of md arrays whose members are all disks
The motivation here is to enable hardware vendors to use regular md arrays for fwraid without the need for mdmonitor. The difficulty is that there will be nothing to distinguish these fwraid arrays from any other user-created array whose members are disks.
Existing arrays whose members/parents are all partitionable will be partitionable.
Existing arrays whose members/parents are all disks will be treated as disks.
It shouldn't be possible to delete such arrays in anaconda. They should be treated like fwraid arrays. It will be possible to delete them in blivet by scheduling an
ActionDestroyFormat
/ActionDestroyDevice
action pair, but callingDeviceTree.recursiveRemove
on them will not destroy the array.