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:
- Patch for aarch64 (aka arm64) openssl 1.0.2 'relocation R_AARCH64_PREL64 against symbol OPENSSL_armcap_P error'
- TIL: the `NO_COLOR` informal standard to suppress ANSI colour escape codes
- Copy the contents of a branch into an existing git branch without merging
- Adding search to a static Jekyll site using pagefind
- asdf, python and automatically enabling virtual envs