20

All LVM commands give me the error /run/lvm/lvmetad.socket: connect failed: No such file or directory. I Googled this error and found only postings related to Grub and Grub-install.

wish to get rid of those errors

# 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
2
  • Are you in a chrooted environment? Commented Nov 1, 2015 at 16:25
  • I am. What should I do?
    – isaaclw
    Commented Feb 19, 2017 at 1:31

2 Answers 2

20

If you are using lvm and systemd do:

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

BTW this is grub related as well. I think grub gets kernel parameter root from /run/lvm/lvmetad.socket.

Wasn't patient to test all this in detail as it worked out to function. Please someone correct me if I'm wrong.

Edit: This is only relevant for systems using systemd for init. If you are on older ubuntu you mnight be using upstart instead and on other systems openrc.

3
  • I did all those commands, none gave me any error. But when I have chrooted and try to update my grub using grub2-mkconfig -o /boot/grub2/grub.cfg, it still returns me the error /run/lvm/lvmetad.socket: connect failed: No such file or directory.
    – Person
    Commented Apr 15, 2016 at 20:50
  • 2
    Ubuntu 16.04 uses systemd now
    – JrBenito
    Commented Sep 10, 2016 at 1:42
  • 1
    "running in chroot, ignoring request"
    – isaaclw
    Commented Feb 19, 2017 at 2:00
10

Assuming you're running Linux, in /etc/lvm/lvm.conf set:

use_lvmetad = 0

Stop LVM prior to doing that: /etc/init.d/lvm stop. Make the change and restart LVM: /etc/init.d/lvm start.

EDIT: I realize there's no such file or directory on Linux Mint, hence neither on Debian nor Ubuntu, shall I deduce. If you don't have such a service, just reboot the computer.

Hint: add your operating system in the tag list.

1
  • 1
    On Ubuntu 16.04 I do have an /etc/lvm/lvm.conf.
    – Andrew
    Commented Feb 3, 2017 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .