linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Ray Morris <support@bettercgi.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] LVM pretends it has more space than it actually has
Date: Mon, 19 Sep 2011 13:48:14 -0500	[thread overview]
Message-ID: <20110919134814.72bd8c3d@bettercgi.com> (raw)
In-Reply-To: <4E777DED.4090302@bsnw.nl>

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.
-- 
Ray Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php




On Mon, 19 Sep 2011 19:37:49 +0200
Gijs <info@bsnw.nl> wrote:

> Thank you for your response, however I don't quite understand what
> you mean by activating them in reverse order. Activating the PV
> before the raid system should be impossible right? And shouldn't
> activating them in the right order solve the problem? Or am I missing
> something here?
> 
> On 19-9-2011 3:23, adultsitesoftware@gmail.com wrote:
> > The  PV is 1MB smaller than the device it's on due to the metadata.
> >
> > The symptoms you are presenting is exactly what would happen if
> > someone had previously set up the RAID and LVM in the typical
> > fashion, with LVM atop RAID, then you tried to activate them in
> > reverse order.
> >
> > If.you value your data, backup the block devices before proceeding.
> >
> > Gijs<info@bsnw.nl>  wrote:
> >
> >> Dear List,
> >>
> >> 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 raid--5-data (253:2)
> >>
> >> 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
> >> following:
> >> 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
> >> allocated.
> >> 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
> >> actually
> >> 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)
> >>
> >> Kind regards,
> >>
> >> Gijs
> >>
> >> _______________________________________________
> >> linux-lvm mailing list
> >> linux-lvm@redhat.com
> >> https://www.redhat.com/mailman/listinfo/linux-lvm
> >> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> >
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 

  reply	other threads:[~2011-09-19 18:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 13:58 [linux-lvm] LVM pretends it has more space than it actually has Gijs
2011-09-19  0:21 ` Stuart D. Gathman
2011-09-19 17:40   ` Gijs
2011-09-19  1:13 ` adultsitesoftware@gmail.com
2011-09-19  1:23 ` adultsitesoftware@gmail.com
2011-09-19 17:37   ` Gijs
2011-09-19 18:48     ` Ray Morris [this message]
2011-09-19 19:48       ` Gijs
2011-09-19 20:41         ` Ray Morris
2011-09-21 18:32           ` Gijs
2011-10-12 20:43             ` Gijs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110919134814.72bd8c3d@bettercgi.com \
    --to=support@bettercgi.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).