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
On Saturday 06 October 2007, Thomas Antony wrote:> 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.The one and only partition on your device (sdb1) has the old size. That is, there's free space on sdb. You have to either 1) create a partition sdb2 (and then a pv on it etc.) or 2) resize the partition sdb1 (then resize the pv etc.). I'd pick #1. remember to reread the partition table after creating the partition (partprobe /dev/sdb or similar) before doing pvcreate on sdb2. The all you have left is to add the pv to your vg, resize the lv (or create a new lv, whichever...). And finally resize the filesystem in the lv. Good luck, Peter -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://lists.centos.org/pipermail/centos/attachments/20071007/02df7814/attachment-0005.sig>
> > The one and only partition on your device (sdb1) has the old size. That is, > there's free space on sdb. You have to either 1) create a partition sdb2 (and > then a pv on it etc.) or 2) resize the partition sdb1 (then resize the pv > etc.). > > I'd pick #1. remember to reread the partition table after creating the > partition (partprobe /dev/sdb or similar) before doing pvcreate on sdb2. > > The all you have left is to add the pv to your vg, resize the lv (or create a > new lv, whichever...). And finally resize the filesystem in the lv. >Hi Peter, How do i resize this partition? parted seems to want to resize the file system also and i think this would make some troubles. I thought pvresize would do this in one step? Thomas