[linux-lvm] LVM pretends it has more space than it actually has
support at bettercgi.com
Mon Sep 19 01:13:09 UTC 2011
Without grepping the source for "pretending" I'd bet the reason the PV is 1MB smaller than the device is on is due to the 1MB used for metadata. You could recreate the PV with no metadata on it if you think that's what you did before.
However, are you 100% sure that you didn't previously use the RAID arryay as the PV? If you swapped the two layers, mdadm and lvm, that what cause exactly the sumption you are presenting - the PV being 1MB smaller than the RAID.
Gijs <info at bsnw.nl> wrote:
>After I ran into some trouble with my raid setup, I managed to get it
>online again, but somehow LVM won't activate the physical volume that
>was on it. Well, to be exact, it will activate the PV, but not all the
>LVs on it. It activates two of the three LVs.
>When I type in "lvchange -a y /dev/raid-5/data" to activate the
>remaining LV, it returns the following errors:
>device-mapper: resume ioctl failed: Invalid argument Unable to resume
>Checking dmesg, it says the following:
>device-mapper: table: 253:2: md127 too small for target:
>start=5897914368, len=1908400128, dev_size=7806312448
>I pretty much tried everything and as a last resort I typed in the
>pvresize -v --setphysicalvolumesize 3996831973376B /dev/md127
>Where 3996831973376 is the exact amount of bytes available on the raid
>array. However, this gave me the following info:
>Using physical volume(s) on command line
>Archiving volume group "raid-5" metadata (seqno 21).
>/dev/md127: Pretending size is 7806312448 not 7806314496 sectors.
>Resizing physical volume /dev/md127 from 952919 to 952918 extents.
>/dev/md127: cannot resize to 952918 extents as later ones are
>0 physical volume(s) resized / 1 physical volume(s) not resized
>Now I wonder why LVM wants to pretend it has more space than it
>has. Because when I subtract those sectors from each other, and I
>calculate how much bytes are in those "pretended sectors", it turns out
>that that's the exact amount that is missing (1MB).
>I'm running Fedora 15 from a rescue USB-stick at the moment, but the
>system itself was formatted/configured under Fedora 14. Could that be
>the cause of the problem? If not, what other options do I have to fix
>this? (without loosing the data on the volume)
>linux-lvm mailing list
>linux-lvm at redhat.com
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
More information about the linux-lvm