19

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
  • Are you in a chrooted environment? – Stephan Schielke Nov 1 '15 at 16:25
  • I am. What should I do? – isaaclw Feb 19 '17 at 1:31
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.

  • 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. – Igettäjä Apr 15 '16 at 20:50
  • 2
    Ubuntu 16.04 uses systemd now – JrBenito Sep 10 '16 at 1:42
  • 1
    "running in chroot, ignoring request" – isaaclw Feb 19 '17 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
    On Ubuntu 16.04 I do have an /etc/lvm/lvm.conf. – Andrew Feb 3 '17 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.