1
In initramfs, type:
#/sbin/lvm vgchange -a y
#vgchange -a y
#exit
If you're unable to solve the issue, type this:
ls /dev/mapper
Now, you should have found root (like /dev/vgname/lvname).
reboot
And then select a kernel on the screen and select e to edit and paste a root value (like /dev/vgname/lvname) at:
/boot/vmlinuxxxxx root=uuid/dev/xxx.
Then, finally, press Ctrl+X to boot.
If problem repeats when reboot the server
go to
#/boot/grub/grub.cfg
at /vm/vmlinuz root=write your full lv path
if problem not fixed try fix initramfs as below
1.Go to server terminal
# sudo rmmod floppy
#echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklis-floppy.conf
#dpkg-reconfigure initramfs-tools
#update-initramfs -u
#update-grub
#reboot
Execute this
#/etc/initramfs-tools/scripts/local-top/forcelvm
with the following contents:
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/functions
lvm vgchange -ay
Then do
# chmod +x `/etc/initramfs-tools/scripts/local-top/forcelvm`
# update-initramfs -u -k all
take backup of lvm2
#apt-get install lvm2
#cp /usr/share/initramfs-tools/scripts/local-top/lvm2 /tmp
Edit lvm2
#vi /usr/share/initramfs-tools/scripts/local-top/lvm2
write Between modprobe -q dm-mod and activate_vg "$ROOT" add this line to initialize your lvm:
lvm vgchange -ayactivate_vg "$ROOT" if you not find this line
write below two line at the end of the file above exit 0
#lvm vgchange -ayactivate_vg "$ROOT"
#activate_vg="$ROOT"
save the file
then
#update-initramfs -u
#update-grub
#reboot