* [linux-lvm] Resize LVM2 partition under VMware
@ 2007-12-18 20:34 Naslain Christophe
2007-12-18 21:57 ` David Robinson
0 siblings, 1 reply; 3+ messages in thread
From: Naslain Christophe @ 2007-12-18 20:34 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 6013 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Resize LVM2 partition under VMware
2007-12-18 20:34 [linux-lvm] Resize LVM2 partition under VMware Naslain Christophe
@ 2007-12-18 21:57 ` David Robinson
2007-12-19 8:55 ` Naslain Christophe
0 siblings, 1 reply; 3+ messages in thread
From: David Robinson @ 2007-12-18 21:57 UTC (permalink / raw)
To: LVM general discussion and development
> 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?
You missed "pvresize /dev/sda2". If the physical volume has changed size
the pvresize command will resize the physical volume and therefore the
volume group its within. If you were to run "vgdisplay VolGroup00" does
it show the Free PE/Size that you expect?
--Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [linux-lvm] Resize LVM2 partition under VMware
2007-12-18 21:57 ` David Robinson
@ 2007-12-19 8:55 ` Naslain Christophe
0 siblings, 0 replies; 3+ messages in thread
From: Naslain Christophe @ 2007-12-19 8:55 UTC (permalink / raw)
To: LVM general discussion and development
Hi David,
Thank a lot for the info, that works fine:
[root@devcentos5 ~]# vgdisplay VolGroup00
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.88 GB
PE Size 32.00 MB
Total PE 636
Alloc PE / Size 636 / 19.88 GB
Free PE / Size 0 / 0
VG UUID Ix1XeP-LzJ0-3SEX-wMJ2-I4Im-2gWv-WCAgWm
[root@devcentos5 ~]# pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
Then I used system-config-lvm to resize the logical volume.
Best,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-19 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 20:34 [linux-lvm] Resize LVM2 partition under VMware Naslain Christophe
2007-12-18 21:57 ` David Robinson
2007-12-19 8:55 ` Naslain Christophe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.