Created attachment 1907329 [details] Proposed patch Description of problem: When using "lvcreate --test", some udev events are still triggered. Version-Release number of selected component (if applicable): v2_03_16 How reproducible: Always Steps to Reproduce: 1. udevadm monitor 2. lvcreate --test vgroup0 -n lvol0 -L10M Actual results: udev CHANGE events happen for the PVs of vgroup0 Expected results: No CHANGE events happen.
Created attachment 1907348 [details] Proposed patch
Well this is not so easy - the whole point of '--test' is to check as close to 'reality' how the command can proceed - and one part of testing is to check write mode is accessible - of course complex target like thin-pool are really hard to check this way - so the --test environment at some point becomes less useful. Note - running udev change event is not considered harmful and again it's more closer to the actual command process if it would be executed directly. I guess you are trying to misuse lvcreate with -vvvv for some 'other then designed' support (BZ #2121015) ATM attached patch is not acceptable as it would break the real purpose of --test option. But there could be some more thinking about some way how to expose possible 'allocations' made by command since also 'lvconvert' can be doing allocations - so the universal option needs some brainstorming - but it's related to the better allocation internal API that would then be possibly better accessible for such queries (as lvm2 was simply not designed for such use case).