Hi,
I have installed a CentOS5 with default partitioning using LVM2 into a VMware (Using VMware Free Server under Linux Fedora Core 7 as host). I now need to extend my VMware disk and partition from 20G to 30G.
What I did previously:
- I successfully extend the VMware disk (.vmdk using the VMware dedicated command: vmware-vdiskmanager).
- Then I have booted my VMware with a Knoppix to run fdisk and extend the partition /dev/sda2 from 20G to 30G.
- I have rebooted on my VMware disk and now try to extend the partition inside CentOS 5...
I first check the size of the disk:
[root@devcentos5 ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 3916.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3916 31350847+ 83 Linux
OK. /dev/sda2 is extended to 3916 which corresponds to 30G (the size I set using fdisk on Knoppix).
The LVM2 config:
[root@devcentos5 ~]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [17.94 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
My main partition is /dev/VolGroup00/LogVol00, the original size corresponds to 20G (17.94 GB once formatted). It uses /dev/sda2 as physical volume.
[root@devcentos5 ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID m2HK0N-BIYP-F1QR-dLtO-BQ76-421H-2p5aXN
LV Write Access read/write
LV Status available
# open 1
LV Size 17.94 GB
Current LE 574
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID vWw6Dm-7b4V-3SLL-6Uaq-WCc0-R91u-Eu1ABP
LV Write Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
Now I try to extend my volume using lvextend command:
[root@devcentos5 ~]# lvextend -L+10G /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 27.94 GB
Insufficient free space: 320 extents needed, but only 0 available
I tried system-config-lvm utility, but there is no unallocated space to use.
How can I get the additional 10G that I added to the /dev/sda2 partition?
Any idea?
Best,
Chris
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/