Operating System - HP-UX
1829102 Members
2373 Online
109986 Solutions
New Discussion

problem trying to lvextend a FS part of a strict VG

 
SOLVED
Go to solution
Mark Harshman_1
Regular Advisor

problem trying to lvextend a FS part of a strict VG

I am trying to extend a FS that is part of a VG that is using pvg-strict/allocation configuration for each LV. I have added disks to each PVG, but when i try to do a lvextend, i get an error that there are "not enough free physical extents available" and that it failed "possibly caused by PVG-strict or distributed allocation policies". This is the first time i have tried to extend a PVG LV after it has been configured so im slightly lost here. THis is on a HPUX server running 11.i. Thanks in advance.
Never underestimate the power of stupid people in large groups
17 REPLIES 17
Uday_S_Ankolekar
Honored Contributor

Re: problem trying to lvextend a FS part of a strict VG

I guess you need to add the new disks in /etc/lvmpg file.

you can edit this file with vi

for example:
VG /dev/vg01
PVG PVG0
/dev/dsk/c0t6d0
/dev/dsk/c0t7d0
/dev/dsk/c0t8d0 <- added pv

-USA..
Good Luck..
Mark Harshman_1
Regular Advisor

Re: problem trying to lvextend a FS part of a strict VG

yes, i checked that and the new disks are reflected in /etc/lvmpvg file.
Never underestimate the power of stupid people in large groups
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

How much is the space available and how much you are trying to allocate.

Space available for you shall be:

*

check the above, and see how the space is available. Like is it equally available on both the PVG's or not. Because when you are extending the LV you are extending mirror also with it. Consider this also. Try allocating bit lesser than above available.

Hope this helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Mark Harshman_1
Regular Advisor

Re: problem trying to lvextend a FS part of a strict VG

i've tried doing it with less also, get the same error. I've attached a vgdisplay of the VG. The last PV in each of the PVG groups are the ones i have added. there are 10 LV's and 10 PVG's. Thanks
Never underestimate the power of stupid people in large groups
Sundar_7
Honored Contributor

Re: problem trying to lvextend a FS part of a strict VG

It is possible the LV is distributed.

Check the allocation policy for the LV : If it is PVG-strict/distributed and if the LV is currently distributed among N number of PVs, you need to add N Number of PVs to the Volume group to be able to extend the LV.
Learn What to do ,How to do and more importantly When to do ?
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

Can you tell what are you trying to do. Like what is the command which you are using and on which LV.

Also check your max pe per PV factor, if you have added PV's which are of size

max PE per PV * PE SIZE , that will be probametic for you as space will not be usable. What size PV's you habe added and what space you are trying to extend. If you can explain this it will be helpful to reply
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

Sundar too has good input..
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sundar_7
Honored Contributor

Re: problem trying to lvextend a FS part of a strict VG

I dont see a use for PVG-Strict allocation in your environment !. Your LVs are not mirrored, so PVG strict will only make sense if the LV is distributed.

If the LV is distributed. refer my above post.
Learn What to do ,How to do and more importantly When to do ?
Mark Harshman_1
Regular Advisor

Re: problem trying to lvextend a FS part of a strict VG

I'm attaching a file that shows a lvdisplay of one of the LV's. They are all configured basically the same. This LV had 4 PV disks in it, each has 3472 PE's of 4mb each. The disk i am adding to the PVG is the same size.
Never underestimate the power of stupid people in large groups
Prashant Zanwar_4
Respected Contributor
Solution

Re: problem trying to lvextend a FS part of a strict VG

You are having distributed policy. You have to turn off the distributed allocation policy and then extend your LV.
lvchange -D n

Do lvextend and then again turn on distributed policy. It requires PVG strict policy.

Hope above helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sundar_7
Honored Contributor

Re: problem trying to lvextend a FS part of a strict VG

As I noted, allocation policy for the LV is distributed.

I believe these are the following new PVs you have added to the volume group

PV Name /dev/dsk/c57t11d0
PV Name /dev/dsk/c69t11d0 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c69t11d1
PV Name /dev/dsk/c57t11d1 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c63t11d2
PV Name /dev/dsk/c75t11d2 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c75t11d3
PV Name /dev/dsk/c63t11d3 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c57t11d4
PV Name /dev/dsk/c69t11d4 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c69t11d5
PV Name /dev/dsk/c57t11d5 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c63t11d6
PV Name /dev/dsk/c75t11d6 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c75t11d7
PV Name /dev/dsk/c63t11d7 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c57t12d0
PV Name /dev/dsk/c69t12d0 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On

PV Name /dev/dsk/c69t12d1
PV Name /dev/dsk/c57t12d1 Alternate Link
PV Status available
Total PE 3472
Free PE 3472
Autoswitch On


As could be seen in the lvdisplay, LV is distributed across 4 PVs. Now to be able to increase the LV, you must add 4 PVs to the PVG group PVG1.

# vi /etc/lvmpvg
PVG name pvg1

PV Name /dev/dsk/c57t2d0
PV Name /dev/dsk/c69t2d1
PV Name /dev/dsk/c63t2d2
PV Name /dev/dsk/c75t2d3
PV Name /dev/dsk/c57t11d0
PV Name /dev/dsk/c63t11d6
PV Name /dev/dsk/c75t11d6 PV Name /dev/dsk/c75t11d7
PV Name /dev/dsk/c63t11d7 PV Name /dev/dsk/c57t12d0
PV Name /dev/dsk/c69t12d0 PV Name /dev/dsk/c69t12d1
PV Name /dev/dsk/c57t12d1

Now try lvextend

Also remember, you should not add the primary link to one PVG and the alternate link of the same PV to a different PVG. That is not going to confuse LVM but will defintely confuse you :-)
Learn What to do ,How to do and more importantly When to do ?
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

you can also use while changing back to distributed policy lvchange -D f
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Mark Harshman_1
Regular Advisor

Re: problem trying to lvextend a FS part of a strict VG

ok...but i dont really want to add 4 more disks to each PVG. I dont want to increase it that much. So.. if i turn off distributed allocation, then extend the LV, then turn distributed allocation back on, can i do that so i only have to add one PV? thanks to all.
Never underestimate the power of stupid people in large groups
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

You can do it. Dont allow any writes that time. You may just unmount the file system this time.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

I would further suggest keep backup also.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: problem trying to lvextend a FS part of a strict VG

Did you do it any further.

And please do not forget to assign points :-)

Take your time...whenever done just remember to post summary..

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Mark Harshman_1
Regular Advisor

Re: problem trying to lvextend a FS part of a strict VG

i took the easy way out and just created a new mountpoint and PVG. thanks to all.
Never underestimate the power of stupid people in large groups