The linux (fc11) box I am working with has a /boot partition and then a VolumeGroup with Logical Volumes. I am trying to do a preupgrade but do not have enough space on the boot patition. How do I free up some space from the VolumeGroup and put into my /boot partition?


I don't know FC11 all that well, but you may not be able to do an online shrink of the root partition. If the partition on the logical volume isn't root, boot into single user, and shrink it from there. If it is /, you need to boot from a rescue disk. Lots of good ones around, but get one with GParted! Ubuntu Live CD fits the bill, as does SystemRescueDisk: http://www.sysresccd.org/Main_Page.

Once you've done that, you need to first shrink the space in use by LVM, and then re-write the parition table to expand /boot.

Once you've got things ready to shrink the LV, first shrink the filesystem on the partition:

resize2fs SLICE new_size

where SLICE is the partition, and new_size is the total new size you want once shrunk. You can use 'M' or 'G' to specify the size.

For example, if I wanted to shrink my root parition down to 100G, I would do this:

resize2fs /dev/mapper/VolGroup00-LogVol00 100G

Now shrink the logical volume that holds the partition:

lvreduce /dev/VolGrou00-LogVol00 100G

Now shrink the physical volume (actually, the amount of the pv availble to LVM)

pvresize /dev/sdas 100G

If you're not sure of the physical volume name, use pvs.

Now you need to actually change the partition table on the drive, shinking /dev/sda2 to that same 100G, and put the rest into whatever partition /boot is on. Use GParted for this -- it's a million times easier than fdisk. It's a GUI program, so can't show you an example, but it's pretty easy to use.


Shrink the filesystem (resize2fs), the logical volume (lvreduce), the physical volume (pvresize), then the partition.

  • Could you please go into a bit more detail? – ricbax Jun 30 '10 at 3:18
  • Any particular sort of detail, or do you want me to read the man pages to you? – Ignacio Vazquez-Abrams Jun 30 '10 at 3:22
  • If this is what you think is informative and the best you can do for me, give yourself a pat on the back. Job well done! – ricbax Jun 30 '10 at 3:26
  • 1
    ricbax, some initiative of your own would be really appreciated in this case. Like reading the man pages of the mentioned utilities at all. – joschi Jun 30 '10 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.