LVM - How to resize a volume group?

John Selmys John.Selmys at SenecaC.On.Ca
Tue May 27 12:37:54 UTC 2008


On 05/27/2008 08:08 AM, Dejan Čabrilo wrote:
> On Sun, May 25, 2008 at 7:40 PM, Dejan Čabrilo <dcabrilo at gmail.com> wrote:
>   
>>> You'll have to shrink the PV first before resizing the partition.. see the
>>> pvresize man page.
>>>       
>
> Right, so I shrunk the PV, and I want to shrink /dev/sda2.
>
> What's the safest way to do it?
> Can parted accomplish it, or should I delete a partition in fdisk and
> then create a smaller one? (the second option scares the hell out of
> me!)
>
> Also, are there any gotchas to watch for?
>
> Thanks,
> Dejan
>
>   
You'll have to delete /dev/sda2 using fdisk - that's what I use - and 
then create a new smaller /dev/sda2. Just be careful not to make it 
smaller than your physical volume. Then you can make /dev/sda3 from the 
free space you have. Normally I use dd to backup my partition table 
first, but yours is so small that you could just as easily write it down 
on a scrap of paper. If you mess things up, you can recover by booting 
from a liveCD (eg knoppix) and restoring your partition table to its 
original state.

John
======
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20080527/2c8519f7/attachment-0001.html 


More information about the users mailing list