LVM: Resizing physical volumes

Luis lemsx1 at
Mon Sep 25 17:27:21 UTC 2006

To be truthful, for a 20GB disk I wouldn't even bother. I'd do this:

buy a new disk and partition correctly, then copy stuff from old disk
to new one (cp -a is your friend).

You can also backup your whole computer to another one (over a local
network connection) and then repartition your disk the right way. (tar
cf is your friend).

I know there is a "better" way of doing this, but the amount of time
you need to find this solution might not be worth the look... That's
just how I feel. Later you will find the right answer and you will
feel like an idiot, but you will always be glad that you got it
working the quick-n-dirty way.

In the future, over allocate space for your partitions ;-) don't be
cheap. A 256MB partition is a waste for /boot, but it's better than
running out of space later. Just use the extra space here to hide your
secret messages on picture files with steganography! that will be a
fun thing to have... (


On 9/25/06, Sarangan Thuraisingham <sarangan.thuraisingham at> wrote:
> Hi all,
>    I am using LVM partitions for my 'root' and 'home' mounts; 'boot' is
> on a physical partition. 'df -h' output as follows:
>    Filesystem            Size Used Avail Use% Mounted on
>    /dev/mapper/linux_part-root
>                          6.9G  5.3G  1.3G  81% /
>    /dev/mapper/linux_part-home
>                           13G  9.1G  3.3G  74% /home
>    /dev/hdc5              59M   59M     0 100% /boot
> I 've been compiling my own kernel and as you can see my boot partition
> is not big enough. boot is on partition 5. LVM uses Physical volumes on
> partitions hdc4 and hdc6. Partition table, as follows:
>    Disk geometry for /dev/hdc: 0kB - 60GB
>    Disk label type: msdos
>    Number  Start   End     Size    Type      File system  Flags
>    1       32kB    16GB    16GB    primary   fat32        boot, lba
>    4       16GB    21GB    5371MB  primary
>    2       21GB    43GB    22GB    primary   fat32        lba
>    3       43GB    60GB    17GB    extended               lba
>    5       43GB    43GB    66MB    logical   ext3
>    6       43GB    60GB    17GB    logical                lvm
> 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'.
> Any ideas welcome.
> --
> Regards,
>   Saru
> ------
> ECS, University of Southampton, UK
> ------
> --
> ubuntu-users mailing list
> ubuntu-users at

Luis Mondesi
*NIX Guru

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc:

More information about the ubuntu-users mailing list