0

This Ubuntu server is a virtual machine. I reported these errors one day after booting up. After the server entered initramfs, I ran pvdisplay and only saw another disk, while the/dev/sda3 disk where ubuntu vg is located does not exist. So I entered the/dev directory, but I did see/dev/sda3

I tried to enter the ISO image system to analyze the problem. After entering, using pvdisplay, you can see that the ubuntu vg/ubuntu lv volume is working properly. Lsblk can also see the volume, and mounting is also normal I tried the following commands through the relevant interface:

Gave up waiting for root device, ubuntu--vg-root doesnt exist

The command is as follows:

mount /dev/mapper/ubuntu--vg-ubuntu--lv /mnt
mount /dev/sda2 /mnt/boot/
mount -o rbind /dev/ /mnt/dev/
mount -t proc proc /mnt/proc/
mount -t sysfs sys /mnt/sys/
chroot /mnt
update-initramfs -u -k all

Still invalid.

Attempted to start with the oldest kernel, but it was invalid

I tried to mount the root device in the ISO system and was able to access all files normally.

The operation status of the relevant commands has been shown in the picture and accompanied by an explanation.

thanks!

Errors during system boot process

Error prompted after entering initramfs

After entering Initramfs, running pvdisplay did not find the root storage device

However, my attempt to search for devices using the cat/dev/sda command does exist.

Enter the ISO system to view, PVdisplay sees/dev/sda3 devices and provides support for Ubuntu vg volume devices

sam123
  • 11

1 Answers1

0

I have found the answer. I previously configured an incorrect configuration on/etc/lvm/lvm.conf

vim /etc/lvm/lvm.conf 
devices{

Filter=["a/sdb/", "r/. */"]

This makes the machine refuse to scan LVM volumes for/dev/sda. Because in this configuration, the system will only scan/dev/sdb Therefore, it should be configured as the LVM device you want the system to scan (the system also needs to fill in the LVM root directory device)

vim /etc/lvm/lvm.conf 
devices{

Filter=["a/sda/", "a/sdb/", "r/. */"]

sam123
  • 11