All of lore.kernel.org
 help / color / mirror / Atom feed
From: Radu Rendec <radu.rendec@mindbit.ro>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Resizing underlying LVM partition after cloning to bigger disk
Date: Fri, 04 Mar 2011 10:41:55 +0200	[thread overview]
Message-ID: <1299228115.13997.37.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.1103031516340.14941@bmsred.bmsi.com>

On Thu, 2011-03-03 at 15:18 -0500, Stuart D. Gathman wrote:
> On Thu, 3 Mar 2011, Scott Arthur wrote:
> 
> > Partition Table: msdos
> > 
> > Number  Start   End     Size    Type      File system  Flags
> >  1      32.3kB  296MB   296MB   primary   ext4         boot
> >  2      296MB   1000GB  1000GB  extended
> >  5      296MB   1000GB  1000GB  logical                lvm
> > 
> > I'm obviously wanting to expand the LVM partition to fill the remaining 1TB
> > of space.
> > 
> > Am I able to simply use parted to resize the partition before doing a
> > pvresize etc?
> > 
> > Or is it risky to resize the underlying LVM partition?

I wouldn't do that. Instead, I would create a new logical partition,
"format" it as lvm physical volume and then extend the volume group to
use this partition as well.

I think this can be safely done like this:

* turn off lvm;
* note down the exact starting and ending *sector* of partition 5 (using
fdisk -lu)
* use fdisk and delete partition 5 and 2, then re-create partition 2 up
to the full disk size
* re-create partition 5 making sure it's on exactly the same starting
and ending sector as it was before
* create new partition 6

> You are getting to a size where msdos partition tables are risky.
> Don't they crap out at 2TB?

They do. But the "2TB" disk is actually 2000GB, which is safe (it takes
more than 2048GB to run into trouble with m$dos partitions).

Best regards,

Radu Rendec

  reply	other threads:[~2011-03-04  8:42 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 [this message]
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
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=1299228115.13997.37.camel@localhost \
    --to=radu.rendec@mindbit.ro \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.