LVM: Resizing physical volumes

Felipe Figueiredo philsf at ufrj.br
Mon Sep 25 19:13:01 UTC 2006


Em Monday 25 September 2006 10:00, Sarangan Thuraisingham escreveu:
> 
> I want to make the boot partition bigger. I tried resizing the physical 
> volume(hdc6) using pvresize.
>    sudo pvresize /dev/hdc6 --setphysicalvolumesize 15.41GB
>    /dev/hdc6: cannot resize to 3944 extents as 3971 are allocated.
>    0 physical volume(s) resized / 1 physical volume(s) not resized
> 
>   But it fails as all of the Physical Extents(PEs) have been allocated. 
> Is there any way of unallocating some of the PEs so that I can resize my 
> boot partition. So far the only suggestion I could find online is to do 
> a 'pvmove'.
>

You have to reduce thigns from the top down, meanin you have to start reducing 
the LVs, to unallocate PEs, then reduce the VGs.

But, reducing the LVs depend on your filesystem choice. You can only reduce 
(ext3 and reiser3), NOT (jfs and xfs). If you chose a reduceable FS, you must 
unmount it before the process. A full check (fsck -f) is advised before the 
resize.

I strongly suggest that you borrow an HD from a friend (or even HD *space*). 
This way you can make a full backup and restore, which would allow you to 
restart the partition from scratch. A slight variation of this, is not to 
reformat the whole disc, but only recreate the PVs (I see you have fat32 
partitions, you probably don't want to mess with those at this point).

regards
FF




More information about the ubuntu-users mailing list