I've been playing around on a test system with a similar partition table. <div><br></div><div>Have successfully resized 2 to fill the disk extent. Partition 5 however proves to be problematic.<div><br></div><div>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. </div>
<div><br></div><div>I then tried the same thing with fdisk but with cylinders instead and both partitions were recreated okay, but destroyed all my LVM stuff.</div><div><br></div><div>I can happily resize 2 using parted but parted wont resize 5.</div>
<div><br></div><div>Should I expect to be able to resize 5, or am I missing the point. Should I simply be creating a partition 6 to fill the additional space opened up by the resizing of partition 2?</div><div><br><div class="gmail_quote">
On 4 March 2011 21:41, Radu Rendec <span dir="ltr"><<a href="mailto:radu.rendec@mindbit.ro">radu.rendec@mindbit.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, 2011-03-03 at 15:18 -0500, Stuart D. Gathman wrote:<br>
> On Thu, 3 Mar 2011, Scott Arthur wrote:<br>
><br>
> > Partition Table: msdos<br>
> ><br>
> > Number  Start   End     Size    Type      File system  Flags<br>
> >  1      32.3kB  296MB   296MB   primary   ext4         boot<br>
> >  2      296MB   1000GB  1000GB  extended<br>
> >  5      296MB   1000GB  1000GB  logical                lvm<br>
> ><br>
> > I'm obviously wanting to expand the LVM partition to fill the remaining 1TB<br>
> > of space.<br>
> ><br>
> > Am I able to simply use parted to resize the partition before doing a<br>
> > pvresize etc?<br>
> ><br>
> > Or is it risky to resize the underlying LVM partition?<br>
<br>
</div>I wouldn't do that. Instead, I would create a new logical partition,<br>
"format" it as lvm physical volume and then extend the volume group to<br>
use this partition as well.<br>
<br>
I think this can be safely done like this:<br>
<br>
* turn off lvm;<br>
* note down the exact starting and ending *sector* of partition 5 (using<br>
fdisk -lu)<br>
* use fdisk and delete partition 5 and 2, then re-create partition 2 up<br>
to the full disk size<br>
* re-create partition 5 making sure it's on exactly the same starting<br>
and ending sector as it was before<br>
* create new partition 6<br>
<div class="im"><br>
> You are getting to a size where msdos partition tables are risky.<br>
> Don't they crap out at 2TB?<br>
<br>
</div>They do. But the "2TB" disk is actually 2000GB, which is safe (it takes<br>
more than 2048GB to run into trouble with m$dos partitions).<br>
<br>
Best regards,<br>
<font color="#888888"><br>
Radu Rendec<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Scottatron | Mob +6421 89 11 88 | skype scottatron<br><br><br>
</div></div>