Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
Thanks!! I applied this fix for a PV that mysteriously got the missing state and all fine. –  Zabuzzman Mar 25 at 15:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.