How can I list the actual block-device name(s) of ephemeral storage available in my EC2 instance?
After some trials and errors, it appears that such devices are connected as /dev/xvdn
(and /dev/xvdm
if there are two) -- is there some way to reliably list them from inside the instance?
fdisk -l
lists all devices -- without anything obviously distinctive about /dev/xvdn
. Same goes for output of lsblk
. (We aren't using Amazon's own AMI-instances, so there is no -p
flag for lsblk
...)
Request for http://169.254.169.254/latest/meta-data/block-device-mapping/ephemeral0
returns sdj
, but there is no /dev/sdj
, so that seems useless... Is there anything better?
The minor device-number seems to be 208 -- can one rely on that?