cheliequan 595d00a2cd [PATCH] bcache-tools: Export CACHED_UUID and CACHED_LABEL
https://github.com/koverstreet/bcache-tools/pull/1

    Add bcache-export-cached helper to export CACHED_UUID and CACHED_LABEL always

    Linux kernel bcache driver does not always emit a uevent[1] for when
    a backing device is bound to a bcacheN device.  When this happens, the udev
    rule for creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does
    not fire and removes any persistent symlink to a specific backing device
    since the bcache minor numbers (bcache0, 1, 2) are not guaranteed across reboots.

    This script reads the superblock of the bcache device slaves,ensuring the slave
    is a backing device via sb.version check, extracts the dev.uuid and
    dev.label values and exports them to udev for triggering the symlink rules in
    the existing rules file.

    1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145

    Signed-off-by: Shaoxiong Li <dahefanteng@gmail.com>
    Signed-off-by: Coly Li <colyli@suse.de>
    Signed-off-by: cheliequan <cheliequan@inspur.com>

(cherry picked from commit 84558fec5f0e4ae5f38ac34dde1775d4eeb766e2)
2024-12-16 14:34:11 +08:00
Description
No description provided
72 KiB
Languages
Diff 100%