Resizing an LVM

Tony Nelson tonynelson at
Sun Jun 3 21:53:41 UTC 2007

At 5:37 PM -0400 6/3/07, Robert L Cochran wrote:
>I have one physical hard drive, a Western Digital 400 Gb which is
>currently 100% used by Fedora Core 5. It is an LVM volume that looks
>like this:
>[rlc at bobcp4 ~]$ df -h
>Filesystem            Size  Used Avail Use% Mounted on
>                      359G   58G  283G  17% /
>/dev/sda1              99M   16M   79M  17% /boot
>/dev/shm             1004M     0 1004M   0% /dev/shm
>I want to resize and repartition this nondestructively so there are 5
>partitions. 3 of these will be the /boot, /, and swap partitions and
>together will total about 119 Gb. The other 2 partitions will each have
>approximately 119 Gb each. My goal is to put 3 different operating
>systems on the hard drive.

/boot must be a Basic partition, not LVM.

>Here is what I believe I need to do.
>1. Boot the Fedora 7 DVD in rescue mode.
>2. Do not mount the file system, instead just go to a shell prompt and
>3. lvm vgscan
>Gets the name of the volume group
>4. lvm vgchange -a y /dev/VolGroup00
>Activates the volume
>5. e2fsck -f /dev/VolGroup00/LogVol00
>Checks file system for errors
>6. resize2fs /dev/VolGroup00/LogVol00 119G
>shrinks the file system down to 119 Gb
>7. fdisk
>shrinks size of partition
>8. lvresize -L -238G /dev/VolGroup00/LogVol00
>Then reboot without the rescue CD and I should still be able to boot
>Fedora Core 5 but the disk will have 238G of unpartitioned free space.
>Does this sequence seem correct?

I think so.  You should do a backup first.  It will only take about 20 or
so DVDs.

>Thanks for any help you can offer!
TonyN.:'                       <mailto:tonynelson at>
      '                              <>

More information about the fedora-list mailing list