Search code examples
amazon-web-servicesamazon-ec2blockvolume

How to identify what is the device name or block name?


enter image description here

I've created an EC2 instance having 2 volumes attached to it, /dev/xvda is for the root volume and dev\sdb is for another magnetic volume which added.

Now when I SSH into the instance and try lsblk I couldn't find the one with dev/sdbenter image description here

since lsblk only returning me 2 blocks which are xvda and xvdb, I can safely assumed that dev/sdb was referring to xvdb but really what is their relation? Sorry I have very minimal linux/unix background and hence this question


Solution

  • AWS used to call the volumes /dev/sdb but now they are automatically called /dev/xvdb even if you attach them with the /dev/sdb name.

    Depending on the block device driver of the kernel, the device could be attached with a different name than you specified. For example, if you specify a device name of /dev/sdh, your device could be renamed /dev/xvdh or /dev/hdh https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html