[CentOS] expand physical volume

Thomas Antony thomas at antony.eu
Sat Oct 6 13:19:45 UTC 2007


Hi.

I added a disk to a hardware raid 5 array and now i want to expand the 
LVM physical volume. There are now 4 sas 146GB disks in the server.
The virtual disk /dev/sdb from the raid controller has been resized 
successfully with the server management software osma.

[root at srv1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 438.4 GB, 438489317376 bytes
255 heads, 63 sectors/track, 53309 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       35539   285466986   8e  Linux LVM



When i run "pvresize /dev/sdb1" the output tells me it has been resized, 
but actually the physical volume didn't expand to the partition size 438GB.

[root at srv1 ~]# pvresize /dev/sdb1
   Physical volume "/dev/sdb1" changed
   1 physical volume(s) resized / 0 physical volume(s) not resized


[root at srv1 ~]# pvdisplay /dev/sdb1
   --- Physical volume ---
   PV Name               /dev/sdb1
   VG Name               VolGroup01
   PV Size               272.24 GB / not usable 24.17 MB
   Allocatable           yes (but full)
   PE Size (KByte)       32768
   Total PE              8711
   Free PE               0
   Allocated PE          8711
   PV UUID               TCE2wI-U5kt-e8hd-d4gU-ug7Y-aEp9-k5QwG6



How can i resize the physical volume sdb1 to the partition size 438GB?

Thank you in advance,
Thomas



More information about the CentOS mailing list