C
C
CityCat42018-10-16 10:32:23
linux
CityCat4, 2018-10-16 10:32:23

How to recover LVM metadata?

Once upon a time there was a virtual woman. It had EL6 of the latest version at that time and two disks - sda and sdb. On sda, as usual, / dev / sda1 with / boot and / dev / sda2 with an LVM volume, where everything else, on sdb is also an LVM volume that was empty. Before moving, I decided to remove the empty sdb volume. Everything is as it should be - vgchange, lvremove, vgreduce. Then removing sdb from the configuration of the machine and it went to another host. On another host, a newer virtual hardware, upgrade, reboot and ...
Pose of a company machine gun ...
If you remove quiet from the kernel command line, you can see that it does not find the volume group that was on that disk. No LVM management command shows anything other than pvdisplay:
5bc591af2cb2b233298589.png
Although if you do dd c /dev/sda2, you can see that the lvm configuration is at the beginning of the volume.
Actually a question - how to recover? (There is no need to advise a backup, there is a backup, it is being restored - a week ago from the moment it grunted). I would like to know if there is a way to restore the damaged machine.
There are lvm configs - from a week old machine, but when I try vgcfgrestore says that there is no metadata area to write to - no metadata areas to write to!
You can do anything with a disk...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question