[linux-lvm] Identifying useable block devices
Marius Vollmer
marius.vollmer at redhat.com
Thu Jan 23 12:35:53 UTC 2014
Peter Rajnoha <prajnoha at redhat.com> writes:
> On 01/22/2014 10:23 AM, Marius Vollmer wrote:
>
>> Is it guaranteed (modulo bugs) that the DM_UDEV_DISABLE_*_RULES flags
>> are only ever removed from a node, and are never added to it over it's
>> lifetime between add/remove events?
>
> No, we don't have this restriction generally
Ok.
>> This isn't true right now, and UDisks fails to handle it correctly
>> when a flag is added in a "change" event. I am asking to figure out
>> where the fix should go.
>
> Well, udisks should always check the DM_UDEV_DISABLE_OTHER_RULES_FLAG
> and if it's set, skip its processing. It already has:
>
> # honor the flag that device-mapper sets if the device should be ignored
> ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="udisks_end"
>
> ..in 80-udisks.rules. So it should be already following this.
That's from UDisks 1, I am concerned with UDisks2, which is a quite
different beast, I think. Sorry for not making this clear.
The problem with UDisks2, as I see it, is that it ignores a "change" or
"add" event that has DM_UDEV_DISABLE_OTHER_RULES_FLAG set, while I think
it should treat it as a "remove" event.
I have proposed this patch:
https://bugs.freedesktop.org/attachment.cgi?id=92577&action=edit
> Hmm, could you please send the whole log.
Sure, attached.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: udev.log
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20140123/cf051315/attachment.log>
-------------- next part --------------
> This is what I see on my machine:
I think you also this, for dm-2:
> UDEV [170.743992] add /devices/virtual/block/dm-2 (block)
> DM_UDEV_DISABLE_DISK_RULES_FLAG=1
> DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
> DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
>
> UDEV [170.771393] change /devices/virtual/block/dm-2 (block)
> DM_NAME=vg-pool
> DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
[...]
> UDEV [170.809403] change /devices/virtual/block/dm-2 (block)
> DM_NAME=vg-pool
> DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
> DM_UDEV_PRIMARY_SOURCE_FLAG=1
[...]
> UDEV [170.871863] change /devices/virtual/block/dm-2 (block)
> DM_NAME=vg-pool
> DM_UDEV_DISABLE_DISK_RULES_FLAG=1
> DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
> DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
> DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
> DM_UDEV_PRIMARY_SOURCE_FLAG=1
[...]
More information about the linux-lvm
mailing list