rightscale-cookbooks / ephemeral_lvm

Configures available ephemeral devices on a cloud server
http://community.opscode.com/cookbooks/ephemeral_lvm
Other
13 stars 16 forks source link

Add support for NVMe devices in EC2 #64

Closed zvymazal closed 7 years ago

zvymazal commented 7 years ago

New i3 instance family provides NVMe devices mapped as nvme0n1, nvme1n1, ... These aren't currently recognised by the cookbook. Since they aren't correctly described by instance metadata either, I decided to add all available NVMe devices.

zvymazal commented 7 years ago

Relevant part of the instance metadata for i3.4xlarge instance:


[ec2-user@ip-172-0-0-1 ~]$ curl http://169.254.169.254/latest/meta-data/block-device-mapping/
ami
ephemeral0
root
[ec2-user@ip-172-0-0-1 ~]$ curl http://169.254.169.254/latest/meta-data/block-device-mapping/ephemeral0
sdb
[ec2-user@ip-172-0-0-1 ~]$  cat /proc/partitions 
major minor  #blocks  name

 202        0    8388608 xvda
 202        1    8386543 xvda1
 259        0 1855468750 nvme1n1
 259        1 1855468750 nvme0n1
screen shot 2017-04-04 at 15 44 01
cywjackson commented 7 years ago

u sure this work for all cases? the code block assumes there is at least a ^block_device_mapping_ephemeral\d+$ , but it is possible to create an i3 instance where there is no ephemeral at all, and as such it won't go into the added code here.