By default upon installing Fedora, it creates one massive Logical Volume Group which takes up your entire drive, and only creates a partition for /. This makes it extremely difficult should you wish to resize this partition/LV, as you cannot shrink an ext2/3 filesystem online. The procedure below gives the steps to enable you to shrink your default installation to enable you to create a seperate LVGroup.

I'm assuming that you'll be resizing an ext3 partition. Other filesystems may well be different. I have no experience with resizing reiserfs, so that is not listed here. You can boot off the Fedora Disc 1 and go into the rescue mode. It is assumed that the logical volulme you wish to resize is <nowiki>/dev/VolGroup00/LogVol00<nowiki>.

  1. Activate the Volume Group:

# lvmchange -a y [[VolGroup00]]
  1. Clear the journal flag from the superblock:

# tune2fs -O ^has_journal /dev/VolGroup00/LogVol00
  1. Use the resize2fs command to shrink the partitions size (Do not shrink it past the used data size on this partition). The line below assumes we are shrinking the filesystem down to 10Gb, there was 4Gb of data on this drive, and the filesystem size was originally 29Gb. This leaves a large margin of error of 5Gb. This step will take a while.

# resize2fs /dev/VolGroup00/LogVol00 10G
  1. Resize the logical volume using the lvresize command. Notice there is a 1Gb margin here, because the lv should never be reduce to less than the size of the filesystem.

# lvresize -L-18G /dev/VolGroup00/LogVol00
  1. When all done, set the has_journal flag back in the superblock for each partition(s):

# tune2fs -O +has_journal /dev/VolGroup00/LogVol00

Repeat the above as necessary for other partitions.

LogicalVolumeManagement/FedoraCore (last edited 2006-10-11 19:21:14 by 81)