1

I've got a logical volume on my virtual Debian server and it seems to be missing.

I've tried to active it by issuing lvchange -ay or vgchange -ay and the result was:

Refusing activation of partial LV srv/vmails. Use '--activationmode partial' to override.

By adding '--activationmode partial I can active the logical volume and after mounting the volume everything seems fine.

I tried running pvscan -v and it lists all corresponding physical volumes but also states that:

There are 4 physical volumes missing.

But they're not, they're up and running!

I can verify that by running blkid on drive and comparing the results with UUIDs in /etc/lvm/backup/srv. However it is notable that some of these PVs are marked with missing flag in /etc/lvm/backup/srv and also /etc/lvm/archive:

flags = ["MISSING"]

Also running pvs shows all of the physical volumes but as you can see some of them are marked as missing:

PV                     VG         Fmt  Attr 
/dev/vdd               srv        lvm2 a-m

Running lvs -v:

There are 4 physical volumes missing.
There are 4 physical volumes missing.

LV        VG      #Seg  Attr        Maj Min KMaj KMin 
vmails    srv       6   -ri-----p-  -1  -1   -1   -1

What does this missing means?
How can I diagnose or fix the issue?

0

1 Answer 1

5

Cause:

Once a device is marked as missing (such as if it cannot be found during a scan and the volume group is activated in "partial" mode), it may need to be manually restored.

Fix:

This resolution only applies to situation where the device is available, contains the expected metadata, and shows up in the output of lvm scans.

vgextend --restoremissing <volume group> <physical volume>

In my case, I first removed missing flag from physical volumes using the command mentioned above. Then I did run a fsck on the logical volume, seems it was not unmounted cleanly. It solved the issue.

Solution from here
Related: [linux-lvm] LVM says physical volumes are missing, but they are not

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .