Skip to content
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

Add udev rule to add by-path links for xen vbd devices #3

Merged
merged 1 commit into from
May 21, 2020

Conversation

surajjs95
Copy link

Xen vbd (virtual block devices) are the storage devices used on xen
instances. On AL1 these devices had by-path symlinks
in /dev/disk which were created by a udev rule in
60-persistent-storage.rules, however this rule required that the
ID_PATH attribute be set. This attribute isn't set by the systemd
version shipped in AL2 (v219) as it's setting for the xen device
was removed in v184. Thus add the 51-ec2-xen-vbd-devices.rules
udev rule to preserve this behaviour. Note the rule sets the ID_PATH
attribute but relies on the existing rule to generate the symlinks.

AL1 output:
$ ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root 10 May 18 23:45 xen-vbd-51712 -> ../../xvda
lrwxrwxrwx 1 root root 11 May 18 23:45 xen-vbd-51712-part1 -> ../../xvda1

AL2 output without patch:
$ ls -l /dev/disk/by-path
ls: cannot access /dev/disk/by-path: No such file or directory

AL2 output with patch:
]$ ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root 10 May 18 23:48 xen-vbd-51712 -> ../../xvda
lrwxrwxrwx 1 root root 11 May 18 23:48 xen-vbd-51712-part1 -> ../../xvda1

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Xen vbd (virtual block devices) are the storage devices used on xen
instances. On AL1 these devices had by-path symlinks
in /dev/disk which were created by a udev rule in
60-persistent-storage.rules, however this rule required that the
ID_PATH attribute be set. This attribute isn't set by the systemd
version shipped in AL2 (v219) as it's setting for the xen device
was removed in v184. Thus add the 51-ec2-xen-vbd-devices.rules
udev rule to preserve this behaviour. Note the rule sets the ID_PATH
attribute but relies on the existing rule to generate the symlinks.

AL1 output:
$ ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root 10 May 18 23:45 xen-vbd-51712 -> ../../xvda
lrwxrwxrwx 1 root root 11 May 18 23:45 xen-vbd-51712-part1 -> ../../xvda1

AL2 output without patch:
$ ls -l /dev/disk/by-path
ls: cannot access /dev/disk/by-path: No such file or directory

AL2 output with patch:
]$ ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root 10 May 18 23:48 xen-vbd-51712 -> ../../xvda
lrwxrwxrwx 1 root root 11 May 18 23:48 xen-vbd-51712-part1 -> ../../xvda1
@fred-lefebvre fred-lefebvre merged commit 3cd27a2 into amazonlinux:master May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants