From: Ray Morris <support@bettercgi.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] How to fix missmatch between VG-size and LV-size?
Date: Tue, 29 Mar 2011 12:44:34 -0500 [thread overview]
Message-ID: <20110329124434.3cf62c3e@bettercgi.com> (raw)
In-Reply-To: <DE6049702F6A4634890B18D047C27E03@caramon>
> While adding a new disk to my LV i ended up with a crash during the
> resize2fs.
resize2fs would be run AFTER lvextend, so if resize2fs was running,
the LV would need to be the new, larger size. Yet, you said
"the system still thinks the LV is the old size". Did you run
vgcfgrestore already, restoring to the point between where you
ran vgextend and lvextend? Perhaps you forgot to run lvextend,
but then one would expect resize2fs to tell you it was already
full sized. Double check what you did, because this information
is not consistent.
> If I can revert the adding of the new drive, I planned on
> trying to vgcfgrestore to an archived config from before I added the
> drive and did the lvextend and resize2fs.
Indeed you could "undo" the vgextend and lvextend via vgcfgrestore,
or via lvreduce + vgreduce, but first you probably need to undo
resize2fs. Use fsck to get the filesystem consistent, if possible.
Then resize it back to the old smaller size. At this point you
can move forward by using lvextend, then resize2fs. You could also
move backward from that point with lvreduce and vgreduce.
--
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 Tue, 29 Mar 2011 17:21:55 +0200
"Fredrik Skog" <fredrik.skog@rodang.se> wrote:
> Hello,
>
> While adding a new disk to my LV i ended up with a crash during the
> resize2fs. Now I have LVM reporting different sizes for my VG and LV.
> How do I fix this?
>
> I tried to do a "vgreduce vgftp /dev/sde1" to remove my new drive
> again. This only gives me an error "Physical volume "/dev/sde1" still
> in use" If I can revert the adding of the new drive, I planned on
> trying to vgcfgrestore to an archived config from before I added the
> drive and did the lvextend and resize2fs. Is this a good way of
> solving the problem? I guess it's not possible to lvreduce the LV by
> the same amount i did lvextend it before, because the system still
> thinks the LV is the old size. I just want to get rid of the PV i
> added to the VG
>
> I'm a bit confused on how to do this.
>
> # vgdisplay
> --- Volume group ---
> VG Name vgftp
> System ID
> Format lvm2
> Metadata Areas 13
> Metadata Sequence No 67
> VG Access read/write
> VG Status resizable
> MAX LV 0
> Cur LV 1
> Open LV 0
> Max PV 0
> Cur PV 12
> Act PV 12
> VG Size 5.59 TiB
> PE Size 4.00 MiB
> Total PE 1464180
> Alloc PE / Size 1089649 / 4.16 TiB
> Free PE / Size 374531 / 1.43 TiB
> VG UUID kOApX5-oTeV-cPWr-h41J-NxML-sbbj-WcKObC
>
> # lvdisplay
> --- Logical volume ---
> LV Name /dev/vgftp/lvftp
> VG Name vgftp
> LV UUID l4EWSh-GOfD-n0Sx-7ZSG-RTVi-p7fC-ApyHZS
> LV Write Access read/write
> LV Status NOT available
> LV Size 4.16 TiB
> Current LE 1089649
> Segments 14
> Allocation inherit
> Read ahead sectors auto
>
>
> thank you
> /Fredrik Skog
next prev parent reply other threads:[~2011-03-29 17:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 15:21 [linux-lvm] How to fix missmatch between VG-size and LV-size? Fredrik Skog
2011-03-29 17:44 ` Ray Morris [this message]
2011-03-29 21:56 ` Fredrik Skog
2011-03-29 22:14 ` Stuart D. Gathman
2011-03-29 23:42 ` Fredrik Skog
2011-03-30 0:27 ` Fredrik Skog
2011-03-30 15:04 ` Ray Morris
2011-03-31 15:06 ` Fredrik Skog
2011-03-31 15:24 ` Ron Johnson
2011-03-31 17:39 ` Stuart D. Gathman
2011-03-31 19:19 ` Georges Giralt
2011-04-01 1:08 ` Fredrik Skog
2011-03-29 22:26 ` Ray Morris
2011-03-30 0:05 ` Fredrik Skog
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=20110329124434.3cf62c3e@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).