Lvmetad is not active yet
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?
Solution 1:
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.