mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-22 00:04:31 +03:00
0b2587b5bc
Add /dev/bcache/by-uuid/ symlinks to cached devices.
19 lines
568 B
Plaintext
19 lines
568 B
Plaintext
# register bcache devices as they come up
|
|
# man 7 udev for syntax
|
|
|
|
SUBSYSTEM!="block", GOTO="bcache_end"
|
|
ACTION=="remove", GOTO="bcache_end"
|
|
|
|
# Backing devices: scan, symlink, register
|
|
IMPORT{program}="/sbin/probe-bcache -o udev $tempnode"
|
|
ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
|
SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="bcache", \
|
|
RUN+="bcache-register $tempnode"
|
|
|
|
# Cached devices: symlink
|
|
DRIVER=="bcache", ENV{CACHED_UUID}=="?*", \
|
|
SYMLINK+="bcache/by-uuid/$env{CACHED_UUID}"
|
|
|
|
LABEL="bcache_end"
|
|
|