1847966 Members
5963 Online
104022 Solutions
New Discussion

vgextend problem

 
R.Mahendran_1
Occasional Advisor

vgextend problem

Dear all,

I am extending a VG by adding a new disk

to increase the FREE PE's (increase free
space) on the VG.

After doing the vgextend also the vgdisplay
shows the same FREE PE's as before vgextend.

Is any one Know the solution?
13 REPLIES 13
RikTytgat
Honored Contributor

Re: vgextend problem

Hi,

Did you execute pvcreate to prepare the physical volume for use in LVM?

Bye,
Rik
Scott Dunkley
Regular Advisor

Re: vgextend problem

I know its the cheats way but pvcreate it through sam and add it to the VG it will be easier, when you do a vgdisplay -v does the new disk show up as being in the VG ????
Better to regret something you have done, than something you havn't
Stefan Farrelly
Honored Contributor

Re: vgextend problem

The TOTAL PE field from vgdisplay should also have increased when you added in a new disk. Did it ? If not then the new disk didnt add into the volume group - if you do a vgdisplay -v | grep "PV Name" does it show the disk you added in ?
Im from Palmerston North, New Zealand, but somehow ended up in London...
Vincente Fernandes
Valued Contributor

Re: vgextend problem

Did you got a message after vgextend saying the "Volume group is successfully extended".
Try doing a "vgchane -a y /dev/vg??" after vgextend.
If yes then do a "strings /etc/lvmtab" and see if you can see the disk i.e.(/dev/dsk/c?t?d?) under the Volume group. For ex.
"/etc/lvmtab:"
/dev/vg??
/dev/dsk/c?t?d?
Also do a "vgdisplay -v /dev/vg?? | grep PV" name.
If still things doesn't work then i suggest you put the vg details and command you used to configure the disk.
CHRIS_ANORUO
Honored Contributor

Re: vgextend problem

Did you extend the filesystems? If not do lvextend -L NNN /dev/vgnn/lvoln;
then extendfs -F (filesystem) /dev/vgnn/rlvoln
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: vgextend problem

Rename /etc/fstab and run vgscan.
Did you extend the filesystems? If not do lvextend -L NNN /dev/vgnn/lvoln;
then extendfs -F (fsytyp) /dev/vgnn/rlvoln
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Cheryl Griffin
Honored Contributor

Re: vgextend problem

Chris,

Rename the /etc/fstab? You mean /etc/lvmtab, then run vgscan.
"Downtime is a Crime."
Wodisch
Honored Contributor

Re: vgextend problem

Check with "vgdisplay -v" if you have got PV-links - then the FREE PEs wont change.
Remove your ?/etc/lvmtab" and re-create it with "vgscan" (see man-page first).
Then do the "vgdisplay -v" and tell us the output.
Kurtkarl
Frequent Advisor

Re: vgextend problem

hi,

Tought you might need this..when extending volume group from a new disk
1. ioscan -fnC = to determine the device file of the disk.
2. pvcreate /dev/rdsk/c1t5d0 = (the device file depends on the results of #1.) If there are errors that the disk contains some LVM information, try pvcreate -f /dev/rdsk/c1t5d0.
3. vgextend /dev/vg01 /dev/dsk/c1t5d0 = The volume group has additional free PEs now.

Thanks
Joey
Just starting to learn thru this forum
Vince Inman
Frequent Advisor

Re: vgextend problem

Dependeing upon the your configuration, there is a maximum amount of PE's that can be in a VG which if I recall correctly is 25535.

And like the MAXPV's, cannot be changed on the fly.
Cheryl Griffin
Honored Contributor

Re: vgextend problem

max_pe can range from 1 to 65535.
"Downtime is a Crime."
Dave Wherry
Esteemed Contributor

Re: vgextend problem

The max pe parameter is not for the volume group. It is max physical extents per physical volume (disk).
When you create the volume group it will default "Max PE per PV" to the size of the largest disk you are adding at that time and it can not be changed later. There have been several discussion related to this in the forums.
My preference is to increase it when I create a volume group. If I'm starting with a 4GB drive I may set max pe to accomodate a 9GB drive in case I add that size drive in the future.
There is some overhead associated with increasing any of the parameters when you create a volume group. There also is no formula or "right" answer to tell you whether to modify those parameters. It depends on so many variable in your environment.
Cisco
New Member

Re: vgextend problem

1) pvcreate -f /dev/rdsk/(c2t6d0) this in bracket is your disk hard ware path you can find your harddisk by doing ioscan.
2) vgextend /dev/vgxx/dev/dsk/c2t6d0
3)lvextend -L size of volgroup /dev/vgxx/lvxx
4)extendfs -F vxfs /dev/vgxx/rlvolxx

after doing all this then mount your file system back again.
substitute xx with your vggroup and logical volumes.