Skip to content

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
developfrom
feature/BCF-6775-ubuntu-24-04-etc-fstab-is-changed-after-bmr
Open

BCF-7100: Respect device identifier type (dm-name-<dm_name> / dm-uuid-<dm_uuid>) during disk-by-id #96
Andrus Suvalau (svlv) wants to merge 1 commit into
developfrom
feature/BCF-6775-ubuntu-24-04-etc-fstab-is-changed-after-bmr

Conversation

@svlv
Copy link
Copy Markdown

Respect device identifier type (dm-name-<dm_name> / dm-uuid-<dm_uuid>) during disk-by-id migration

Copilot AI review requested due to automatic review settings June 3, 2026 12:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_match and get_new_device_identifier helpers for selecting an appropriate /dev/disk/by-id identifier.
  • Refactor 260_rename_diskbyid.sh to 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.

Comment thread usr/share/rear/lib/udev-functions.sh Outdated
Comment thread tests/COVE/004_udev_functions.bats
Jira-Ref: BCF-7100: Respect device identifier type (dm-name-<dm_name> /
dm-uuid-<dm_uuid>) during disk-by-id migration
@svlv Andrus Suvalau (svlv) force-pushed the feature/BCF-6775-ubuntu-24-04-etc-fstab-is-changed-after-bmr branch from 63217ac to cd641e3 Compare June 3, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants