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
#2596 Have unused LVM PV devices only as comment in disklayout.conf file #2603
Conversation
Signed-off-by: Gratien D'haese <gratien.dhaese@gmail.com>
@gdha |
@jsmeix Be my guest ;-) |
Reorgainzed the error checking logic to keep error checking sufficiently complete. In particular still error out when "PV device '$pdev' is empty or more than one word". Additional DebugPrint when "Skipping PV $pdev that is not part of a valid VG" and more exact wording in user messages regarding what was actually tested.
@gdha |
@gdha |
Much simpler and more straightforward code (KISS). In particular check abort condition first and error out directly there.
When code looks bad it is bad so I re-reorganized the error checking code: |
Typo fix "cannot to make" -> "cannot make"
@jsmeix It is fine for me. Thanks for the rewrite |
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.
So hereby I happily approve my own rewrite ;-)
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.
Still not fully good.
I need to add something more...
Added missing comments that explain why the code is as is and added the iusse URL rear#2596 to explain why PVs that are not part of a VG are documented as comment in disklayout.conf
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.
So now is all hopefully sufficiently explained
so that others could properly fix issues or adapt and enhance it
as needed at any time later, cf. https://github.com/rear/rear/wiki/Coding-Style
@gdha |
When there is no objection I will merge it tomorrow afternoon . |
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.
@jsmeix code seems good to me
Have unused LVM PV devices only as comment in disklayout.conf: PVs that are not part of a VG are documented as comment in disklayout.conf but they are not recreated because they were not used on the original system so there is no need to recreate them by "rear recover" see rear#2596
Signed-off-by: Gratien D'haese gratien.dhaese@gmail.com
Type: Enhancement
Impact: Low
Reference to related issue (URL): Unused RHEL Physical Volume aborts mkrescue #2596
How was this pull request tested? manually via savelayout
Brief description of the changes in this pull request: Do not stop with an Error during the savelayout when we discover a PV that is not part of a VG