Skip to content

Commit

Permalink
nvme-udev-rule: add udev rule to ensure block device symlinks exist f…
Browse files Browse the repository at this point in the history
…or modern nvme EBS mappings
  • Loading branch information
missinglink committed Feb 8, 2022
1 parent 46420d5 commit 5f2988f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions templates/setup.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ if [[ "$potential_nvme_disk" != "" ]]; then
data_volume_name=$potential_nvme_disk
fi

# Automatic Mapping of NVMe-style EBS Volumes to Standard Block Device Paths
# https://github.com/oogali/ebs-automatic-nvme-mapping
sudo curl -s \
-o /usr/local/sbin/ebs-nvme-mapping.sh \
https://raw.githubusercontent.com/oogali/ebs-automatic-nvme-mapping/master/ebs-nvme-mapping.sh

sudo curl -s \
-o /etc/udev/rules.d/999-aws-ebs-nvme.rules \
https://raw.githubusercontent.com/oogali/ebs-automatic-nvme-mapping/master/999-aws-ebs-nvme.rules

sudo chmod +x /usr/local/sbin/ebs-nvme-mapping.sh
sudo apt-get update -y && sudo apt-get install -y nvme-cli
sudo udevadm control --reload-rules && udevadm trigger && udevadm settle

sudo mkfs -t ext4 $data_volume_name
sudo tune2fs -m 0 $data_volume_name
sudo mkdir -p ${elasticsearch_data_dir}
Expand Down

0 comments on commit 5f2988f

Please sign in to comment.