Disabling lvm2-lvmetad.socket/service on CentOS/RHEL 7 system works while the system is running, but after a reboot, it comes up again. This post will show you how to prevent this from happening.
1. Modify the /etc/lvm/lvm.conf file with your favorite file editor, like vi or nano, and switch the value of “use_lvmetad = ” from 1 to 0.
# vi /etc/lvm/lvm.conf use_lvmetad = 0
2. Stop, Disable, and Mask the lvm2-lvmetad service/socket.
# systemctl stop lvm2-lvmetad.service lvm2-lvmetad.socket # systemctl disable lvm2-lvmetad.service lvm2-lvmetad.socket # systemctl mask lvm2-lvmetad.service lvm2-lvmetad.socket
3. Verify if the changes are in effect. You can reboot the system and now the service/socket will not come back up. To revert your changes you need to unmask, start, and enable the service/socket.
# systemctl unmask lvm2-lvmetad.service lvm2-lvmetad.socket # systemctl start lvm2-lvmetad.service lvm2-lvmetad.socket # systemctl enable lvm2-lvmetad.service lvm2-lvmetad.socket