Comment 30 for bug 1861941

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

OK.

I've reviewed the kernel code, and there are no unexpected changes w.r.t the CACHED_UUID change event. So I don't think we will need any kernel changes which is good.

With the small change to the 60-persistent-storage.rules to not attempt to create a /dev/disk/by-uuid symlink for the backing device; instead we want to only create a /dev/bcache/by-uuid symlink to the bcacheN device (that is associated with the backing device).

# by-label/by-uuid links (filesystem metadata), skip bcache backing,caching devices, handled in 69-bcache.rules
ENV{ID_FS_TYPE}=="bcache", GOTO="skip_fs_uuid_enc"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="skip_fs_uuid_enc"

And then with my previously proposed changed to 69-bcache.rules in place

https://github.com/g2p/bcache-tools/pull/29/files

The test-case works just fine.