[linux-lvm] LVM pretends it has more space than it actually has

Ray Morris support at bettercgi.com
Mon Sep 19 20:41:41 UTC 2011

First, if at all possible make a copy of the underlying block 
device using dd or dd_rescue. Very often the most severe damage 
is done during the attempt at recovery.

Then let's find the oldest back up copies on the LVM meta data to 
see if we can verify how things were set up when they were working.
This will find metadata over 50 days old:

find /etc/lvm/archive -mtime +50

mainly what we're looking for is to see if any mdadm RAID devices 
were used as PVs at some point.

Next try mdadm --assemble --readonly --assume-clean /dev/sdFOO to see 
if you can assemble an array using the lower level device (which is 
also marked as a PV right now). If it assembles, do:
pvdisplay -m /dev/md0 
to see if it's a PV, and check to see if it has a filesystem.

Based on the messages you got, it looks like /dev/md0 at one point 
was the PV, rather than being assembled from LVs.
Ray Morris
support at bettercgi.com

Strongbox - The next generation in site security:

Throttlebox - Intelligent Bandwidth Control

Strongbox / Throttlebox affiliate program:

On Mon, 19 Sep 2011 21:48:15 +0200
Gijs <info at bsnw.nl> wrote:

> Ah like that. Ok, I can't imagine I typed such a command, but I guess
> I can never really know. But let's say I did, would it be possible to 
> somehow retrieve the data from that volume? By increasing the
> underlying raid-5 maybe? Or is it forever lost?
> On 19-9-2011 20:48, Ray Morris wrote:
> > The symptoms you are presenting, the "missing" 1MB are similar
> > to if someone did this in the past:
> >
> > mdadm --create /dev/md1 /dev/sd[ab]1
> > pvcreate /dev/md1
> >
> > Then later someone did this:
> > mdadm --assemble /dev/md1 /dev/volgroup/firstLV
> >
> > The VG, or the reported size of the PV, is 1MB smaller than
> > the device the PV is on, due to the metadata. If the RAID array,
> > or rather any raid array, were created on /dev/sda1, for
> > example, but then later activated using /dev/volgroup/LV,
> > mdadm would report that the device was 1MB too small, which is
> > exactly the message you are getting.
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

More information about the linux-lvm mailing list