-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
vdev_id: Create symlinks even if no /dev/mapper/ #11698
Merged
Merged
Conversation
This file contains 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
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
behlendorf
approved these changes
Mar 7, 2021
behlendorf
added
Status: Accepted
Ready to integrate (reviewed, tested)
and removed
Status: Code Review Needed
Ready for review and testing
labels
Mar 7, 2021
jsai20
pushed a commit
to jsai20/zfs
that referenced
this pull request
Mar 30, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
adamdmoss
pushed a commit
to adamdmoss/zfs
that referenced
this pull request
Apr 10, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
sempervictus
pushed a commit
to sempervictus/zfs
that referenced
this pull request
May 31, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
tonyhutter
added a commit
to tonyhutter/zfs
that referenced
this pull request
Nov 2, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
tonyhutter
added a commit
to tonyhutter/zfs
that referenced
this pull request
Nov 13, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
tonyhutter
added a commit
to tonyhutter/zfs
that referenced
this pull request
Nov 13, 2021
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes openzfs#11698
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.
Motivation and Context
Fix
vdev_id
not working on some nodes.Description
vdev_id
uses the/dev/mapper/
symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no/dev/mapper/
entry for the UUID at the timevdev_id
is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the$DEVNAME
that udev passes us (like DEVNAME="/dev/dm-1").This patch tries to resolve the dm name from
$DEVNAME
first, before falling back to looking in/dev/mapper/
. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes.How Has This Been Tested?
Tested on one RHEL 8 node where the by-vdev links weren't being created at boot time, and verified that this fixed it. Also saw it fix the reproducer case of removing/reloading the multipath devices (
multipath -F && multipath -r
). Further sanity tested on two other enclosures type nodes.Types of changes
Checklist:
Signed-off-by
.