I am running a container with CentOS:
docker run -it centos bash
I first check for its Label or UUID:
[root@3271c071fe0a /]# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.3.0-1032-aws root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 nvme_core.io_timeout=4294967295
Then I tried to use the Label (cloudimg-rootfs) and convert it to device name so I used blkid but it doesn't print anything:
[root@3271c071fe0a /]# blkid -L="cloudimg-rootfs"
[root@3271c071fe0a /]#
I was expecting to get /dev/xvda1 because I checked it with lsblk:
[root@3271c071fe0a /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop1 7:1 0 96.6M 1 loop
loop2 7:2 0 28.1M 1 loop
loop3 7:3 0 97.1M 1 loop
xvda 202:0 0 8G 0 disk
`-xvda1 202:1 0 8G 0 part /etc/hosts

