错误“/run/lvm/lvmetad.socket:连接失败:没有这样的文件或目录” - 但与 Grub 无关

错误“/run/lvm/lvmetad.socket:连接失败:没有这样的文件或目录” - 但与 Grub 无关

所有 LVM 命令都会给出错误/run/lvm/lvmetad.socket: connect failed: No such file or directory。我用 Google 搜索了这个错误,只找到了与 Grub 和 Grub-install 相关的帖子。

希望摆脱这些错误

# pvs
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning.
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  PV         VG      Fmt  Attr PSize  PFree
  /dev/vdb1  vdatavg lvm2 a--  16.00g 6.00g

答案1

如果您使用 lvm 和 systemd,请执行以下操作:

systemctl enable lvm2-lvmetad.service
systemctl enable lvm2-lvmetad.socket
systemctl start lvm2-lvmetad.service
systemctl start lvm2-lvmetad.socket

顺便说一句,这也与 grub 有关。我认为grub获取内核参数来自/run/lvm/lvmetad.socket。

当它发挥作用时,没有耐心详细测试所有这些。如果我错了,请有人纠正我。

编辑:这仅与使用 systemd 进行 init 的系统相关。如果你使用的是较旧的 ubuntu,你可能会使用 upstart,而在其他系统上则使用 openrc。

答案2

假设您运行的是 Linux,如下/etc/lvm/lvm.conf所示:

use_lvmetad = 0

在执行此操作之前停止 LVM:/etc/init.d/lvm stop。进行更改并重新启动 LVM:/etc/init.d/lvm start

编辑:我意识到 Linux Mint 上没有这样的文件或目录,因此我可以推断,Debian 和 Ubuntu 上都没有这样的文件或目录。如果没有这样的服务,只需重新启动计算机即可。

暗示:将您的操作系统添加到标签列表中。

相关内容