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
Data disks udev rule #624
Data disks udev rule #624
Conversation
@paulmey, |
Don't merge yet, we're still testing on all distros... |
I think the use of $ID_PATH is not going to be very consistent across distributions. In some distributions we do not see ID_PATH configured, or the formatting varies. We might want to revert to using something like "/sys/block/%k/device" as you were in an earlier version. Running "udevadm info --query=property --name=/dev/sdc | grep ID_PATH" I see the following results on various endorsed distros: SLES 11: CentOS 6: CentOS 7: Ubuntu 14.04: Ubuntu 16.04: The lack of ID_PATH or any by-path links in CentOS 7 seems to be a bug and related to this issue: https://access.redhat.com/solutions/1565863 |
config/66-azure-storage.rules
Outdated
# Root has a GUID of 0000 as the second value | ||
# The resource/resource has GUID of 0001 as the second value | ||
ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="root", GOTO="azure_names" | ||
ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="resource", GOTO="azure_names" | ||
PROGRAM="/bin/sh -c 'echo $ID_PATH|cut -d: -f5'", ENV{fabric_name}="datadisks/lun$result", GOTO="azure_names" |
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.
The following seems to work more consistently across distros and versions:
KERNEL=="sr*", GOTO="azure_end"
PROGRAM="/bin/sh -c 'readlink /sys/block/%k/device|cut -d: -f4'", ENV{fabric_name}="datadisks/lun-$result", GOTO="azure_names"
That will need a bit of work to also work with partitions... I'll be back |
3ab57a0
to
8afe9ed
Compare
8afe9ed
to
040a622
Compare
@szarkos check it out. I've changed it so it now works for:
Detailed results: https://gist.github.com/paulmey/aa40585ced19f3857c02d9f031580f86#file-results-txt |
Okay, one more change coming. People want us to prepare for usage of multiple controllers. |
Adds matching rules for all scsi disks other than root/resource disk
Data disks will show up as /dev/disks/azure/datadisks/lun*, matching the LUN's specified on attach/deploy
Also fixed the test-out matching, since vendor and model were completely ignored