From: Milan Broz <mbroz@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Resizing underlying LVM partition after cloning to bigger disk
Date: Sat, 05 Mar 2011 16:11:52 +0100 [thread overview]
Message-ID: <4D7252B8.7040600@redhat.com> (raw)
In-Reply-To: <AANLkTinATFdAZ6fsrE_vkfJ6pMrF6v0xfN4hu8sqEP0N@mail.gmail.com>
On 03/05/2011 03:13 AM, Scott Arthur wrote:
> I've been playing around on a test system with a similar partition
> table.
>
> Have successfully resized 2 to fill the disk extent. Partition 5
> however proves to be problematic.
>
> Using fdisk, I tried deleting 2 and 5 and recreating based on
> sectors, but couldn't recreate 5 on the same starting sector, it told
> me I was out of bounds.
>
> I then tried the same thing with fdisk but with cylinders instead and
> both partitions were recreated okay, but destroyed all my LVM stuff.
>
> I can happily resize 2 using parted but parted wont resize 5.
If the start of partition moves (even by 1 sector) LVM metadata will
not be recognised. So you must manipulate only with partition end.
Cylinders can round up the start of partition so this can easily happen.
fdisk in sector mode (fdisk -u) should allow that, if it is not possible,
I guess it is bug (be sure to use new fdisk from util-linux[-ng], there
was a lot of bugfixes in last years).
(and partition 5 is extended partition so you probably need to resize
"parent" partion before it as well.)
Anyway, from the LVM point of view you can do both - either move partition
end to enlarge disk (and inform LVM about it using pvresize afterward)
or simply add new partition to VG.
(The problems are usualy outside of LVM scope - like 2G partition limitation,
problems to change open partition size in kernel etc.)
Just avoid moving the start sector of PV - this will not work.
Milan
next prev parent reply other threads:[~2011-03-05 15:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 5:25 [linux-lvm] Resizing underlying LVM partition after cloning to bigger disk Scott Arthur
2011-03-03 20:09 ` John Drescher
2011-03-03 20:18 ` Stuart D. Gathman
2011-03-04 8:41 ` Radu Rendec
2011-03-04 13:50 ` Stuart D. Gathman
2011-03-04 15:31 ` Phillip Susi
2012-03-05 23:07 ` Dan B.
2011-03-05 2:13 ` Scott Arthur
2011-03-05 15:11 ` Milan Broz [this message]
2011-03-06 12:24 ` Radu Rendec
2011-03-04 10:13 ` Lyn Rees
2011-03-04 12:19 ` Scott Arthur
2011-03-04 21:57 ` Stuart D. Gathman
2011-03-04 21:49 ` Koen Vermeer
2011-03-04 22:05 ` John Drescher
2011-03-04 22:07 ` John Drescher
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=4D7252B8.7040600@redhat.com \
--to=mbroz@redhat.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).