LVM "warning failed to connect to lvmetad"
指尖二进制 • 1 年前 • 969 次点击 • LINUX
警告无法连接到lvmetad
在服务器安装完毕之后进行分区时输入一些分区命令出现警告
[root@localhost ~]# pvs
WARNING: lvmetad connection failed, cannot reconnect.
lvmetad cannot be used due to error: Connection reset by peer
WARNING: To avoid corruption, restart lvmetad (or disable with use_lvmetad=0).
WARNING: Not using lvmetad because cache update failed.
PV VG Fmt Attr PSize PFree
/dev/vda2 centos lvm2 a-- <9.00g 0
如果报warning failed to connect to lvmetad,falling back to device scanning.错误
简单的方法是编辑/etc/lvm/lvm.conf这个文件,找到use_lvmetad = 1将1修改为0保存,并重新配置grub。
[root@localhost ~]# vim /etc/lvm/lvm.conf
# use_lvmetad = 1
use_lvmetad = 0
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
WARNING: Not using lvmetad because config setting use_lvmetad=0.
WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).
WARNING: Not using lvmetad because config setting use_lvmetad=0.
WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).
Found linux image: /boot/vmlinuz-3.10.0-957.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-5d774105f5c14a2f9b1f3a278302c50e
Found initrd image: /boot/initramfs-0-rescue-5d774105f5c14a2f9b1f3a278302c50e.img
WARNING: Not using lvmetad because config setting use_lvmetad=0.
WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).
WARNING: Not using lvmetad because config setting use_lvmetad=0.
WARNING: To avoid corruption, rescan devices to make changes visible (pvscan --cache).
done
最后重启系统
[root@localhost ~]# reboot