Skip to content

Commit

Permalink
udev: update symlink path for EBS mappings
Browse files Browse the repository at this point in the history
Create the symlinks to the actual devices under `/dev/by-ebs-id` so that
the names don't collide with actual devices created by the kernel.

Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
  • Loading branch information
arnaldo2792 committed Aug 19, 2024
1 parent 8559e24 commit 96e0872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/os/ebs-volumes.rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ ATTRS{model}!="Amazon Elastic Block Store", GOTO="ebs_volumes_end"
ENV{DEVTYPE}=="disk", ATTR{queue/io_timeout}="4294967295"

# Add symlink for disk
KERNEL=="nvme[0-9]*n[0-9]*", ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/bin/ghostdog ebs-device-name $devnode", SYMLINK+="$env{XVD_DEVICE_NAME}"
KERNEL=="nvme[0-9]*n[0-9]*", ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/bin/ghostdog ebs-device-name $devnode", SYMLINK+="disk/by-ebs-id/$env{XVD_DEVICE_NAME}"

# Add symlink for partition
KERNEL=="nvme[0-9]*n[0-9]*p[0-9]*", ENV{DEVTYPE}=="partition", IMPORT{parent}="XVD_DEVICE_NAME", SYMLINK+="$env{XVD_DEVICE_NAME}$number"
KERNEL=="nvme[0-9]*n[0-9]*p[0-9]*", ENV{DEVTYPE}=="partition", IMPORT{parent}="XVD_DEVICE_NAME", SYMLINK+="disk/by-ebs-id/$env{XVD_DEVICE_NAME}$number"

LABEL="ebs_volumes_end"

0 comments on commit 96e0872

Please sign in to comment.