I found out that my recently installed Proxmox hypervisor sporadically can’t boot due to inability to find it’s LVM logical volumes:
This situation means that our initramfs is successfully loaded, unpacked and finished it’s work, and now, when the OS should run the real filesystem, disks are not present.
First of all, you need to activate VG(s) with vgchange -aa, as shown on screenshot. If you can do this successfully, it means that our LVM configuration is ok, and you can process to server boot with Ctrl+D.
When your server finishes booting, check dmesg for any hardware errors. If it’s OK, so we can come to conclusion that that the root cause of the problem is slow RAID controller (I use 3ware), which can’t present disks to system in specified time. So the solution is changing rootdelay directive in grub.cfg by adding the corresponding value to linux line. 10 seconds must be enough:
linux /boot/vmlinuz-4.2.6-1-pve root=/dev/mapper/pve-root ro rootdelay=10 quiet
Be careful with manually changing this file and check twice which menuentry you are editing.
Now try to reboot your server, it must work as planned.