I have a CentOS 7 box that is acting very strangely. On first boot, typing "blkid" produces:
[BurnC7 (2015-12-17 22:00:25) ~]# blkid
/dev/block/8:3: UUID="c83f7479-4bc1-44e5-84ae-e38a83e75219" TYPE="ext4"
/dev/block/8:2: UUID="2a5bfdfb-2b1d-4748-96bd-fe919b132ce4" TYPE="ext4"
/dev/block/8:5: UUID="94be252f-51df-44cf-afde-57214a08d149" TYPE="swap"
[BurnC7 (2015-12-17 22:00:26) ~]#
I'm looking for a UUID -> /dev/sdX device name marriage, which is the normal output. Further puzzling, specifying a partition I KNOW exists from lsblk, typing "blkid /dev/sda2", for example, it now shows up in the regular "blkid" output:
[BurnC7 (2015-12-17 22:00:26) ~]# blkid /dev/sda2
/dev/sda2: UUID="2a5bfdfb-2b1d-4748-96bd-fe919b132ce4" TYPE="ext4"
[BurnC7 (2015-12-17 22:02:31) ~]# blkid
/dev/block/8:3: UUID="c83f7479-4bc1-44e5-84ae-e38a83e75219" TYPE="ext4"
/dev/block/8:2: UUID="2a5bfdfb-2b1d-4748-96bd-fe919b132ce4" TYPE="ext4"
/dev/block/8:5: UUID="94be252f-51df-44cf-afde-57214a08d149" TYPE="swap"
/dev/sda2: UUID="2a5bfdfb-2b1d-4748-96bd-fe919b132ce4" TYPE="ext4"
[BurnC7 (2015-12-17 22:02:33) ~]#
Even stranger STILL is that after a reboot, the blkid output now looks fine:
[BurnC7 (2015-12-17 22:04:35) ~]# blkid
/dev/sda2: UUID="2a5bfdfb-2b1d-4748-96bd-fe919b132ce4" TYPE="ext4"
/dev/sda3: UUID="c83f7479-4bc1-44e5-84ae-e38a83e75219" TYPE="ext4"
/dev/sda5: UUID="94be252f-51df-44cf-afde-57214a08d149" TYPE="swap"
[BurnC7 (2015-12-17 22:04:37) ~]#
So obviously, blkid is getting bum information from somewhere - but where?
Is there a more reliable method to get UUID -> /dev/ device name relationships?
Edit: As suggested by Michael Hampton below, "ls -l /dev/disk/by-uuid/" works, even when blkid doesn't (this is on a different unit than the examples above):
[BurnC7 (2015-12-18 12:00:40) ~]# blkid
/dev/block/8:3: UUID="ac2e5bb8-76d9-47e1-b5f7-3b91fad9e35f" TYPE="ext4"
/dev/block/8:2: UUID="6de21dfd-956d-4593-a8f2-88eeed2198f8" TYPE="ext4"
/dev/block/8:5: UUID="f6c41a22-f962-4b71-b880-54c8afb49516" TYPE="swap"
[BurnC7 (2015-12-18 12:00:41) ~]# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Dec 18 11:41 6de21dfd-956d-4593-a8f2-88eeed2198f8 -> ../../sda2
lrwxrwxrwx 1 root root 10 Dec 18 11:41 ac2e5bb8-76d9-47e1-b5f7-3b91fad9e35f -> ../../sda3
lrwxrwxrwx 1 root root 10 Dec 18 11:41 f6c41a22-f962-4b71-b880-54c8afb49516 -> ../../sda5
[BurnC7 (2015-12-18 12:00:47) ~]#
To find devices by UUID, you can look in
/dev/disk/by-uuid
.For example: