]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: allow persistent storage rules for rbd devices
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 5 Sep 2024 10:31:20 +0000 (12:31 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Sep 2024 23:26:44 +0000 (08:26 +0900)
The RADOS Block Device (rbd) can be used as any other block device with
further layers on top of it, hence allow the common persistent storage
rules to apply, including watching for changes.

rules.d/60-block.rules
rules.d/60-persistent-storage.rules.in

index 3134ab995ecef2c098eaa88cd8e8b8d99b74f134..13f88e92c8fbd1e058b4fbe9fb481ef56a52ac70 100644 (file)
@@ -9,5 +9,5 @@ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block",
 
 # watch metadata changes, caused by tools closing the device node which was opened for writing
 ACTION!="remove", SUBSYSTEM=="block", \
-  KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", \
+  KERNEL=="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|rbd*", \
   OPTIONS+="watch"
index 390c6e00343dbc87ba1b78284af97386981295c9..76cab7fbc7a444ef9896d1587f4ab1bdba701401 100644 (file)
@@ -7,7 +7,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
 ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
 
 SUBSYSTEM!="block|ubi", GOTO="persistent_storage_end"
-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end"
+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*|rbd*", GOTO="persistent_storage_end"
 
 # ignore partitions that span the entire disk
 TEST=="whole_disk", GOTO="persistent_storage_end"