1

I'm in a server environment (RHEL 7.2 or thereabouts) and I noticed that my udev rules get invoked (creating my custom symlinks) when I run parted print, even if I'm just listing partitions. When I run fdisk, udev is not triggered.

I strace -f'd both, and only noticed two suspicious items: 1) parted opens a bunch of udev stuff (but I can't really tell whether it calls anything), 2) parted opens the device first in RO and then, later, RW. I'm not sure if there's some udev hook for that.

Does anybody know of a systemd/udevd piece that might be involved in this?

thanks!

1

Ok... I figured this out... (exec 5<> /dev/sda) triggers udev to evaluate rules for sda. read-only doesn't trigger it, so somewhere udev is using inotify or kprobe, or some sort of device listener to get triggered on read-write.. probably on close.

(this is a partial answer, in that it's clear what actions cause the trigger, but I'd like to leave this question open in case someone can elucidate exactly what piece is directly telling udev to trigger... like if systemd/udevd is intercepting open/close, or if there's an inotify or kprobe involved.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.