Comment 19 for bug 1861941

Revision history for this message
Ryan Harper (raharper) wrote :

Following up my question; we should see both events in all kernels.

The first event is when the /dev/bcache0 is joined with a cache device, and emitts the CACHED_UUID value in the uevent; the UUID is the *backing device bcache metadata UUID* it is not related to the content contained within the backing device; this CACHED_UUID is symlinked at /dev/bcache/by-uuid

Once /dev/bcache0 is created, blkid will scan the contents of /dev/bcache0 which contains an ext4 filesystem and the FS_UUID is symlinked at /dev/disk/by-uuid.

CACHED_UUID != FS_UUID
/dev/bcache/by-uuid != /dev/disk/by-uuid

I speculate that udev has a bug where it's only looking at the basename of the symlink target and removing any other 'by-uuid' link against the device when it needs to account for the full path of the symlink since the bcache/by-uuid is different than the disk/by-uuid.