Marco d'Itri wrote: > On Aug 20, Vincent Danjean <[EMAIL PROTECTED]> wrote: > >> - why does my solution not work [1] ? > Because the correct method is to react to change events.
I was thinking that I was reacting to the 'add block dm-0' event. I will look at your fix to understand my mistake >> - does my solution work in my case (no mdadm, only lvm2 with no snapshot) >> or can my change trigger big problems for me ? > It should continue to work. Worst thing, it will stop working. Great. >> - how can we debug udev stuff ? (I tried my 'correction' with udevtest > I don't know what you mean. I mean two things : 1) I do not know how to get the events that udev have to process. I suppose that, when lvm create the logical partition, udev get the event 'action=add subsystem=block kernel=dm-0' Is it the real event ? Is there more information in the submitted even ? Is there other events created (by the kernel ? by other software or even by other udev rules if this is possible ?) 2) I also do not know which rules are exactly applied when such an event occures. For example, I tried A) udevtest --action=add --subsystem=block /block/sda/sda2 B) udevtest --action=remove --subsystem=block /block/sda/sda2 C) udevtest --action=foo --subsystem=block /block/sda/sda2 C) udevtest --action=ADD --subsystem=block /block/sda/sda2 A and B show several actions such as update_link: 'disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part2' with target 'sda2' has the highest priority 0, create it C and D do not show any action (rules are parsed, udev/monitor and hal sockets are notified, and that's all) However, at the start of /etc/udev/persistent.rule, there is : ACTION!="add", GOTO="persistent_storage_end" So, why B behave like A and not like C and D ? If there were a way to trace the applied rules (for this event, udev applies the rules from lines 1, 3, 4 and 5 of file xxx, rules from lines 23, 24, 25 of file yyy, ...) it would be great. By the way, many thanks for the information you provide, in particular for the fact that I can keep my fix on my laptop. I will wait for you real fix and try to learn from it. Best regards, Vincent -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]