Get /dev/sdX device mappings for AWS nvme nitro disks on Ubuntu
AWS nitro instances use block device names like /dev/nvme2n1
but the AWS console still shows them as /dev/sdb
etc, so it can be difficult to work out which disk in the console maps to the mounted device when looking at df -h
.
Use this to get the console mapping:
$ sudo nvme id-ctrl -v /dev/nvme2n1 2>&1 | grep "0000:"
0000: 73 64 69 20 20 20 20 20 20 20 20 20 20 20 20 20 "sdi............."
So in the above example, block device /dev/nvme2n1
will be shown as /dev/sdi
in the AWS console.
The nvme
command is from the nvme-cli project.
All links, in order of mention:
- AWS nitro: https://aws.amazon.com/ec2/nitro/
- nvme-cli: https://github.com/linux-nvme/nvme-cli
Recent posts:
- Automating Jekyll card generation with ruby's Ferrum gem
- Use a basic Gmail account to "Send mail as" with a domain that uses Cloudflare email routing
- Recursively searching and downloading objects from AWS S3 with the `aws` CLI
- Set up a freshly installed macos Monterey machine as a gitlab-runner host
- Quick overview of gitlab's CI/CD workflows, stages and jobs using gitlab 14.2+ in 2022