-
Notifications
You must be signed in to change notification settings - Fork 60
Support nvme devices #54
base: master
Are you sure you want to change the base?
Conversation
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <[email protected]>
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.
Need some clarification on the regexp pattern used to match device names
@@ -149,10 +149,11 @@ function get_next_logical_device() { | |||
for letter in ${alphabet[@]}; do | |||
# use /dev/xvdb* device names to avoid contention for /dev/sd* and /dev/xvda names | |||
# only supported by HVM instances | |||
if [ ! -b "/dev/xvdb${letter}" ]; then | |||
if [[ $created_volumes =~ .*/dev/xvdb${letter}.* ]]; then |
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.
Is the .*
at the start of the pattern needed, and can the .*
at the end of the pattern be scoped to a subset - e.g. [0-9]
?
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 string in created_volumes comes from $(aws ec2 describe-volumes)
which is JSON output, to avoid having to actually parse it (and pull in jq or python or something) it just does the simpler match to see if "/dev/xvdb${letter}" shows up anywhere in the describe-volumes output, which is good enough to guess that we probably shouldn't try to use it.
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.
So the leading and trailing .*
are there to consume all the other stuff we don't care about.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <[email protected]>
Using 'sh install.sh -d /dev/nvme2n1 -f lvm.ext4', this seems to work on AWS Linux 2023, where /dev/nvme2n1 is a 200GB gp3 disk |
Issue #41
Improve the script to discover volumes at both /dev/xvdb and /dev/nvme
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.