Resizing an LVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@bobcp4 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     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.

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?

Thanks for any help you can offer!

Bob Cochran
Greenbelt, Maryland, USA




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux