3

We have had a major power failure in the data-center. We are using a set of servers for our storage needs. The main server has several pairs of disks mirrored with mdadm. The resulting /dev/mdX are LVM physical volumes and belong to a big volume-group with all our data.

After the powerloss, we had the problem that one of the mdadm devices was not auto-detected due to a missing entry in mdadm.conf. As a consequence, the volumegroup had inactive logical volumes due to the missing PV.

We were able to fix the mdadm config and reboot. pvscan shows all expected PVs but one LV still does not come up. vgdisplay shows:

[...]
Cur PV:  3
Act PV:  2
[...]

Neither vgscan nor pvscan show any missing devices.

What went wrong? How can we force LVM to activate all PVs?

mensi
  • 189
  • 1
  • 12

1 Answers1

5

A fix we came up with in the hurry was to do:

vgcfgbackup -f backup.vg

Then edit the file, replacing

flags = ["MISSING"]

with

flags = []

In the PV that was the problem and used

vgcfgrestore -f backup_edited.vg

to load the modified config. After that, vgchange -a y name_of_the_vg worked like expected.

mensi
  • 189
  • 1
  • 12