Skip to content

Commit

Permalink
udev: update ebs-volume rules
Browse files Browse the repository at this point in the history
This adds two new rules to create symlinks for both the disks and the
partitions, using the device name configured for the EBS volume

Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
  • Loading branch information
arnaldo2792 committed May 29, 2024
1 parent b832250 commit a2c4360
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/os/ebs-volumes.rules
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
ACTION=="remove", GOTO="ebs_volumes_end"
KERNEL!="nvme*", GOTO="ebs_volumes_end"
SUBSYSTEM!="block", GOTO="ebs_volumes_end"
ENV{DEVTYPE}!="disk", GOTO="ebs_volumes_end"
ATTRS{model}!="Amazon Elastic Block Store", GOTO="ebs_volumes_end"

# Follow AWS recommendation of never timing out IO on EBS volumes attached via NVMe
KERNEL=="nvme*", ATTRS{model}=="Amazon Elastic Block Store", ATTR{queue/io_timeout}="4294967295"
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}"

# 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"

LABEL="ebs_volumes_end"

0 comments on commit a2c4360

Please sign in to comment.