Failed to connect to lvmetad: booting issue

Failed to connect to lvmetad: booting issue

I have gone through: “A connection to the bus can’t be made”
And: “ERROR No UMS support in radeon module!”
Now dealing with: “Failed to connect to lvmetad”
This trilogy has become a funny and an unexpected blog series on “A habit of Learning”. Let’s find out, do I get rid of these booting issues once and for all, or another error is keeping an eye on me? (Noooooo!)

Machine Specs:

https://www.sony.com.sg/electronics/support/laptop-pc-vpc-series/vpcea45fg/specifications

Problem:

* Type: Booting time issue
* Effect: Slow booting
* Error Message:

failed to connect to lvmetad

* Brief Explanation: After upgrading from Ubuntu 16.04 to 18.04 and then updating my graphics drivers. I am getting this error while booting. Making the booting slow.

Cause:

Kernel Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799295

What is lvmetad?

From the man page of lvmetad:

lvmetad is a metadata caching daemon for LVM. The daemon receives notifications from udev rules (which must be installed for LVM to work correctly when lvmetad is in use). Through these notifications, lvmetad has an up-to-date and consistent image of the volume groups available in the system. By default, lvmetad, even if running, is not used by LVM. See lvm.conf(5).

Solution:

This is the key reference I used to resolve this issue and speed up my booting time:

The answer of Shahriar Shovon solved the issue for me:
https://support.linuxhint.com/question/lvm-issue-ubuntu-18-04-failed-to-connect-to-lvmetad/

What I did:

Edit /etc/lvm/lvm.conf file with the following command:

$ sudo nano/etc/lvm/lvm.conf

Now, find the line use_lvmetad=1 and change it to use_lvmetad=0

 

Now, run the following command to update the initramfs file for the new kernel:

$ sudo update-initramfs -k YOUR_KERNEL_VERSION -u

$ sudo sync

Command to update initframs may differ for different distros. And to get my Kernal_version I just pressed tab during the command $ sudo update-initramfs -k <tab> and available kernel version appeared. And I selected the latest one.

Reboot and you are good to go!

Conclusion:

I just disabled that service (the best I could do) to get rid of this issue.

After this, I was able to boot without lvmetad error. But wait…
Not again! Still, the booting is slow (~2 minutes) and it stuck at a line for around 15-20 seconds that says:

Scanning for btrfs file systems

I found this solution: https://unix.stackexchange.com/questions/78535/how-to-get-rid-of-the-scanning-for-btrfs-file-systems-at-start-up, but never used it. I am okay as far as I am not getting any error, failed type of words in booting. So that’s it. All okay now! 🙂

What you think? Should I remove btrfs-tools from the system? Let me know in the comments section below.

I hope this post will help someone.

Thanks for reading!

Advertisements

2 thoughts on “Failed to connect to lvmetad: booting issue

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s