Dec 01 05:07:25.679368 ubuntu systemd-udevd[474]: LINK 'disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869' /lib/udev/rules.d/60-persistent-storage.rules:79 Dec 01 05:07:25.683008 ubuntu systemd-udevd[474]: WARK: dev_old_name=/dev/bcache/by-uuid/92d882d8-38cd-4537-847b-6f9c40ba67b4 dev_old_path=/devices/virtual/block/bcache0 Dec 01 05:07:25.683042 ubuntu systemd-udevd[474]: WARK: dev_name=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869 dev_path=/devices/virtual/block/bcache0 Dec 01 05:07:25.683066 ubuntu systemd-udevd[474]: WARK: streq(name=/dev/bcache/by-uuid/92d882d8-38cd-4537-847b-6f9c40ba67b4, name_current=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869) Dec 01 05:07:25.683076 ubuntu systemd-udevd[474]: update old name, '/dev/bcache/by-uuid/92d882d8-38cd-4537-847b-6f9c40ba67b4' no longer belonging to '/devices/virtual/block/bcache0' Dec 01 05:07:25.683085 ubuntu systemd-udevd[474]: WARK: link_update(name=/dev/bcache/by-uuid/92d882d8-38cd-4537-847b-6f9c40ba67b4, false Dec 01 05:07:25.683094 ubuntu systemd-udevd[474]: no reference left, remove '/dev/bcache/by-uuid/92d882d8-38cd-4537-847b-6f9c40ba67b4' Dec 01 05:07:25.683104 ubuntu systemd-udevd[474]: WARK: dev_old_name=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869 dev_old_path=/devices/virtual/block/bcache0 Dec 01 05:07:25.683113 ubuntu systemd-udevd[474]: WARK: dev_name=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869 dev_path=/devices/virtual/block/bcache0 Dec 01 05:07:25.683122 ubuntu systemd-udevd[474]: WARK: streq(name=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869, name_current=/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869) Dec 01 05:07:25.683131 ubuntu systemd-udevd[474]: WARK: found match! continue Dec 01 05:07:25.683146 ubuntu systemd-udevd[474]: handling device node '/dev/bcache0', devnum=b250:0, mode=0660, uid=0, gid=6 Dec 01 05:07:25.683155 ubuntu systemd-udevd[474]: set permissions /dev/bcache0, 060660, uid=0, gid=6 Dec 01 05:07:25.683165 ubuntu systemd-udevd[474]: preserve already existing symlink '/dev/block/250:0' to '../bcache0' Dec 01 05:07:25.683174 ubuntu systemd-udevd[474]: found 'b250:0' claiming '/run/udev/links/\x2fdisk\x2fby-uuid\x2f0a270acb-56b8-4498-8bad-b3bb149fe869' Dec 01 05:07:25.683183 ubuntu systemd-udevd[474]: creating link '/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869' to '/dev/bcache0' Dec 01 05:07:25.683193 ubuntu systemd-udevd[474]: preserve already existing symlink '/dev/disk/by-uuid/0a270acb-56b8-4498-8bad-b3bb149fe869' to '../../bcache0' Dec 01 05:07:25.683201 ubuntu systemd-udevd[474]: created db file '/run/udev/data/b250:0' for '/devices/virtual/block/bcache0' Dec 01 05:07:25.683211 ubuntu systemd[1]: dev-disk-by\x2duuid-0a270acb\x2d56b8\x2d4498\x2d8bad\x2db3bb149fe869.device: Changed dead -> plugged Dec 01 05:07:25.683226 ubuntu systemd[1]: dev-bcache0.device: Changed dead -> plugged Dec 01 05:07:25.683234 ubuntu systemd[1]: sys-devices-virtual-block-bcache0.device: Changed dead -> plugged The new dev (from /deb/bcache0) only has a by-uuid devlink as the UEVENT that generates the CACHED_UUID devlink is not recorded/discovered after the original binding of the cache device and backing store. This forces udev to remove the link. I hacked in a change which allows the old link to stay if the old_name, or old_path match; this keeps the symlinks around. This is required (or the kernel fix to emit the CACHED_UUID on cold plug); but not sufficient. What else is needed is a change to the bcache rules file such that when a bcacheN device is replugged, it will query the backing device's superblock to find out the dev.uuid, and import that value as CACHED_UUID so that the dname rule can match the path /dev/bcache/by-uuid/ and dname will point to that, which abstracts away whether it points to bcache0, 1 , or N. /dev/disk/by-dname/foo -> ../../../bcache/by-uuid/ -> ../../bcacheN On Thu, Nov 30, 2017 at 7:16 PM, Ryan Harper