Bug 1459842

Summary: [RFE] Print a warning message for users to set global_filter instead of local filter, if lvmetad is running on server and a custom filter is detected.
Product: Red Hat Enterprise Linux 7 Reporter: Milan P. Gandhi <mgandhi>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: LVM Metadata / lvmetad QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: medium    
Priority: medium CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 7.4Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-23 19:29:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan P. Gandhi 2017-06-08 10:34:43 UTC
Description of problem:

  In the previous version of RHEL 5/6 the filter option was heavily used by users to make sure that lvm commands uses only specific devices e.g. partition on internal disk used for root filesystem and multipath device maps.

  Large number of users are still trying to use the same practice of setting the filter in RHEL 7 with lvmetad running. But with lvmetad enabled it would use global_filter setting and not the local filter. Thus even if system admins set the filter, lvm commands still continue to scan all the devices accepted by global_filter (which by default accepts all devices in /dev/). 

  This also results in a situations where customer tries to set the filter to make sure that lvm volumes use multipath device maps so that failures of underlying sub paths would not affect IO on lvm volumes, also setting the filter option would help to eliminate "duplicate PV" messages, but since the local filter is no longer honored while lvmetad is enabled, users do not get the expected results. Customers still continue to get the "duplicate PV" messages, simply because they did not set the global_filter when lvmetad was enabled.

  Above scenario has lately generated quite a large number of support cases where customers had set local filter with lvmetad and the global_filter was not set. Below KCS solutions documents the issues generated due to the lack of setting global_filter with lvmetad running on server:

  "LVM filter is not being honored."
   https://access.redhat.com/solutions/1220053

  "lvm doesn't respect filter option"
   https://access.redhat.com/solutions/2058913

  "Getting error "WARNING: Device for PV aaaaa-bbbbb-ccccc-ddd-3243-ddd-eeeee" not found or rejected by a filter.""
   https://access.redhat.com/solutions/1532583


  Total number of cases attached with above KCS solutions: 49


  We can always address the above issue with documentation, KCS solutions, but it would also be good to display a small notification, warning message to the users, informing them if they have set the local filter with lvmetad running and have forgot to apply the global_filter. Currently due to the lack of any such warning, customer are unsure of any configuration issue or any other problems with lvm configuration, and it generates quite a few support cases for same problem/resolution repeatedly.

  Could we add the warning similar to the one shown below with "pvscan", "vgscan", "lvscan" commands to inform users if they have forgot to set global_filter option with lvmetad running? and have set only the local filter?


	WARNING: Found a custom filter, but no 'global_filter' is specified
		 With lvmetad enabled, only the 'global_filter' will be used
		 To filter out specific devices please set 'global_filter' 
		 option.

Version-Release number of selected component (if applicable):
RHEL 7
lvm2-2.02.166-1.el7_3.3.x86_64

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
No warning displayed if user has set local filter option with lvmetad running but forgot to set a correct global_filter.

Expected results:
Display a small notification, warning message to the users, informing them if they have set the local filter with lvmetad running and have forgot to apply the global_filter.

Comment 2 Jonathan Earl Brassow 2019-10-23 19:29:02 UTC
no lvmetad in rhel8.  will not change behavior in rhel7.