[systemd-devel] How to stop systemd-udevd reading a device after dd
Michal Sekletar
msekleta at redhat.com
Fri Oct 13 09:01:55 UTC 2017
On Thu, Oct 12, 2017 at 6:01 PM, Akira Hayakawa <ruby.wktk at gmail.com> wrote:
> And I want to stop the read request because it makes it difficult to test kernel code.
> So the second question is: how can I stop the read request?
You can install local udev rule that will disable udev's monitoring of
the block device.
# cat /etc/udev/rules.d/61-no-watch-sdb.rules
ACTION!="remove", SUBSYSTEM=="block", KERNEL=="sdb*", OPTIONS:="nowatch"
# udevadm control --reload-rules
Udev watches exist because block layer doesn't have any generic
mechanism that could be used by the tools (e2fsprogs and friends) to
make sure that udev picks up changes that they did, e.g. change in
filesystem label.
Michal
More information about the systemd-devel
mailing list