BCF-7100: Respect device identifier type (dm-name-<dm_name> / dm-uuid-<dm_uuid>) during disk-by-id #96
Open
Andrus Suvalau (svlv) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds udev-related helper functions to ensure disk-by-id migration preserves the original device-mapper identifier prefix (dm-name- vs dm-uuid-), avoiding unintended identifier-type changes during recovery finalization.
Changes:
- Introduce
check_device_identifier_type_matchandget_new_device_identifierhelpers for selecting an appropriate/dev/disk/by-ididentifier. - Refactor
260_rename_diskbyid.shto use the shared helper instead of duplicating udev symlink parsing. - Add Bats unit tests covering dm-name/dm-uuid selection behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| usr/share/rear/lib/udev-functions.sh | New helper functions to select /dev/disk/by-id identifiers while preserving dm identifier type. |
| usr/share/rear/finalize/GNU/Linux/260_rename_diskbyid.sh | Switch disk-by-id migration logic to use the new helper function. |
| tests/COVE/004_udev_functions.bats | New unit tests validating identifier-type matching and selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Jira-Ref: BCF-7100: Respect device identifier type (dm-name-<dm_name> / dm-uuid-<dm_uuid>) during disk-by-id migration
63217ac to
cd641e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Respect device identifier type (
dm-name-<dm_name>/dm-uuid-<dm_uuid>) during disk-by-id migration