19

After upgrade to Ubuntu 16.04, it is showing the following message during the boot:

lvmetad is not active yet; using direct activation during sysinit

lvmetad is not active yet; using direct activation during sysinit

/dev/mapper/server--vg-root: clean xxx/xxx files, xxx/xxx blocks

The Xs refers to a big sequence of numbers. After this message appears, the login screen is shown and I can log in to the system.

How can I solve this problem?

Zanna
  • 70,465
  • Is it causing any actual problems with your system, or are you just concerned about that boot message? It seems to me you could safely ignore it. –  May 09 '16 at 15:42
  • 1
    I have to wait about 10 minutes until it prompts for enter. Still no solution found. – dmatej May 15 '16 at 10:16
  • 1
    have you tried https://unix.stackexchange.com/questions/199164/error-run-lvm-lvmetad-socket-connect-failed-no-such-file-or-directory-but yet? – x29a May 17 '16 at 08:35
  • Also see http://askubuntu.com/questions/769863/lvmetad-is-not-active-yet-using-direct-activation-during-sysinit/783977#783977 – Thijs D Sep 28 '16 at 06:47
  • Having to wait 10 minutes is due to a different issue, continue checking your logs. – Telegrapher Oct 13 '16 at 05:24

2 Answers2

10

Don't worry, there is no danger, follow this little guide to resolve the problem.

These messages are not dangerous, after a while LVM (a software abstraction over your disk) will scan the partitions and your system will boot normally. There is a delay due to the lack of optimization, since lvmetad is a system service (daemon) that caches the LVM condition to prevent useless disk accesses and it does not start soon enough (probably for a bug or misconfiguration).

Ubuntu Desktops doesn't need it to work.

Solution

Open a Terminal (CTRL+ALT+T or search in Dash), write sudo -H gedit /etc/lvm/lvm.conf and press ENTER (insert your user credentials). In the editor find:

use_lvmetad = 1

...and change the line to:

use_lvmetad = 0

Do not make other changes, you only need to change a single number and save the file. After this, you may close the Terminal or log-off from the VT.

This will disable any attempt to use the lvmetad daemon and if your disk configuration is simple enough your boot will be faster and any LVM command will not try a new connection to the system bus of lvmetad. You may notice more disk activity, this is a normal behavior.

The warnings will remain, this is the right behavior and it doesn't have side affects.

Please note: this is a good but temporary solution, future GNU/Linux versions will not need this procedure.

Optimization

After the edit, you may also execute (in the same type of Terminal) the command sudo systemctl disable lvm2-lvmetad.service to disable lvmetad completely.

This is not necessary and you should contact your system administrator before doing it.

What NOT to do

Never boot with the nomodeset option enabled, because it WILL disable many GPU features and your graphics card may not work correctly. Ubuntu Desktops will not work correctly with this option enabled, because Unity (and successive GUIs) and many applications need the graphic acceleration and the advanced GPU features.
This option must be only used to debug graphic drivers or to start a system without the right graphic drivers.
Important: on some systems the user may need to disable this option in GRUB to login, while other systems will simply be slower but usable.

EDIT (10/03/2017): after disabling the service and upgrading one of my Debian machines (Ubuntu is based on Debian) I noticed that the warning disappeared. The upgrade installed the kernel Linux 4.9.0-0.bpo.2 for AMD 64 (64-bit). It can be temporary or limited to some architectures, but it is a step forward, also because Ubuntu can inherith the change. I suppose that a developer saw this message and they are working on the problem. Well done FOSS.


Fell free to comment under here if you need more help and don't forget to press the left UP arrow and accept the answer.

  • 2
    change 1 to 0 and it had not effect. – user1133275 Jun 07 '17 at 02:28
  • You must save the file using the admin privileges and reboot your machine. This option may have no effect on some hardware configurations and specific versions of lvmetad, due to a bug: in this case you must upgrade Ubuntu and also follow the Optimization section of the answer. This should solve your particular case. :-) – Lorenzo Ancora Jun 09 '17 at 10:53
  • thanks for the answer, I have another issue preventing me from upgrading from 16.04 to 17.04 so I guess I'm at an impasse until I resolve that other issue. – user1133275 Jun 09 '17 at 16:56
  • for ubuntu 16.04, kernel 4.4.0, that makes no diff :( – Aquarius Power Jul 02 '17 at 01:28
  • @Aquarius Power TY for you feedback: this is not a kernel bug, upgrading your kernel is useless. You must upgrade your system (from 16.04 to 17.04 or better) before following any solution. Follow these instructions: https://askubuntu.com/questions/767140/lvmetad-is-not-active-yet/886865?noredirect=1#comment1459550_886865 Upgrade (to 17.04 or better 18.04) and then follow the solution. In the rare case that the solution does not work, report the bug directly to the Ubuntu developers. Have a nice day. :-) – Lorenzo Ancora Jul 03 '17 at 11:00
  • Up! I get the very same error than OP except the screen is stuck here. I tried some of the solutions using tty2 I found here and elsewhere with nothing. I even remade the swap partition while actually it doesnt seem linked to it. All I did was do regular update. Current kernel is 4.4.0-83-generic. – hyamanieu Jul 08 '17 at 13:18
  • @Wli the swap partition is not linked with this problem and the kernel version is not relevant, as stated before. You must do a full system upgrade and hope that the bug gets fixed for your hardware configuration. Note: the lack of output can be caused by a faulty Ubuntu installation or can be a side effect of the lvmetad error. If the problem is caused by lvmetad the boot will probably continue after 10/20 minutes or more, but this is not guaranteed on Ubuntu. If you have troubles booting I suggest a clean installation of Ubuntu LTS without LVM. I hope this bug gets fixed soon, for all of us. – Lorenzo Ancora Jul 09 '17 at 19:16
  • 1
    @LorenzoAncora thanks for your input and you are right: I posted a question and answered to myself after 6 hours of hard work: I simply had to update my GPU driver compatible with the latest LTS ubuntu. – hyamanieu Jul 10 '17 at 07:45
  • 1
    @Wli You're welcome. In GNU/Linux distributions the graphic and network drivers are a common problem which can hide other bugs, but is getting better with time. If the problem returns don't hesitate to ask for support here in AskUbuntu. Have a nice day. :-) – Lorenzo Ancora Jul 10 '17 at 21:39
-3

I managed to resolve this for my machines by adjusting the grub configuration like so:

In /etc/default/grub, change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

Then add this line: GRUB_TERMINAL_INPUT="console serial"

Run update-grub and reboot for the changes to take effect.

Zanna
  • 70,465
Kyle
  • 90
  • I tried this and message was gone.However it messed with my graphics and it was lagging very much. Even minimizing and maximizing effects was affected and working very slow – Saurabh Jul 20 '16 at 04:54
  • 1
    If the message is related to lvm why does this afect it at all? In my case I have this message, a delay of 3~5 seconds (I use SSD) and then graphics start. I don't think "lvmetad" is caused by graphic setting. Also check: https://unix.stackexchange.com/questions/199164/error-run-lvm-lvmetad-socket-connect-failed-no-such-file-or-directory-but] – JrBenito Sep 10 '16 at 01:39
  • 11
    Again, this terrible answer. It is unrelated to the issue and dangerous – Telegrapher Oct 13 '16 at 05:23
  • @Telegrapher: Admire the fact that you pointed out the problem and did not fiercely down voted the answer. – biocyberman May 28 '17 at 12:40