The Problem
The user has set a new value for the parameter global_filter in the /etc/lvm/lvm.conf file. After setting the parameter value ‘vgs’ command gives below error:
# vgs Configuration setting "global/global_filter" unknown. ...
The Solution
User has put the “global_filter” parameter under the ‘global {}‘ section in /etc/lvm/lvm.conf configuration file.
global { ... global_filter = [ "r/.*/" ] ... }
Perform the following steps to solve the LVM filter issue:
1. Take a backup of the existing /etc/lvm/cache/.cache file and remove the original file.
# mv /etc/lvm/cache/.cache /tmp
Here we are taking backup as well as removing the file in a single step and you can choose any other directory as well for backup.
2. Rearrange the “global_filter” parameter in /etc/lvm/lvm.conf file. Comment output the existing global_filter = [ “r/.*/” ]” line which is active in the global {} section of lvm.conf file. Add the same global_ filter parameter in the ‘devices {}‘ section of /eyc/lvm/lvm.conf file.
devices { ... global_filter = [ "r/.*/" ] ... }
3. Take a backup of the existing initramfs and rebuild it, so that the changed /etc/lvm/lvm.conf file will be used for subsequent reboots.
CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image