Operating System - HP-UX
1748280 Members
3860 Online
108761 Solutions
New Discussion юеВ

Failure possibly caused by strict allocation policy

 
SOLVED
Go to solution
Mousa55
Super Advisor

Failure possibly caused by strict allocation policy

Hi All,

I am tray to extend the logical volume /tmp, but I facing problem during execute lvextend -L 2064 /dev/vg00/lvol6 /dev/dsk/c0t6d0 command
Or form SAM, and the error massage appeared is:
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol6" could not be extended.
Failure possibly caused by strict allocation policy
And I am change the mirror number from 1 to 0 and then the extend operation succeed.
But I after that I canтАЩt change again the number of mirror and the same error appeared.
How to solve this problem to back I can change the mirror number and this message not appeared.
# vgdisplay -v /dev/vg00 | grep -i free
Free PE 328
Free PE 0
Free PE 328
The /tmp after extend:
# lvdisplay /dev/vg00/lvol6
--- Logical volumes ---
LV Name /dev/vg00/lvol6
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4128
Current LE 258
Allocated PE 258
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
7 REPLIES 7
TTr
Honored Contributor
Solution

Re: Failure possibly caused by strict allocation policy

You can try turning off the strict allocation policy using "lvchange -s ..." and try the extend again. It looks like you have 3 disks in the volume group, after you turn off the strict option if you use mirroring ensure that you are not mirroring in the same disk. Also if you use distributed allocation policy you may have to turn that off too.

James R. Ferguson
Acclaimed Contributor

Re: Failure possibly caused by strict allocation policy

Hi:

You need to rethink this. Strict allocation is designed to prevent you from allocating mirrored extents for a logical volume on the same pnysical disk.

Your error is a "reminder" that if you defeat this, you have sacrificed high-availablity and the ability to lose one of two copies of data and still be able to recover that data.

Regards!

...JRF...
Ganesan R
Honored Contributor

Re: Failure possibly caused by strict allocation policy

Hi,

By default LVM will follow strict allocation policy for all the logical volumes to ensure the high availablity. Strict allocation policy will make sure that mirror extends will not be assigned from the primary disk.

In your case you need to find out in what are the disks /tmp lv is distributed. You can use lvdisplay -v command to find out.

If primary copy of /tmp is distributed across two disks and if you have total three disks on the VG then you cannot extend it. You should have another two disks to create the mirror.

Otherwise you need to move all the extends to one disk using pvmove command then mirror it. Other workaround would be turning off the strict allocation policy, but that is not recommanded

Best wishes,

Ganesh.
Mousa55
Super Advisor

Re: Failure possibly caused by strict allocation policy

Hi All,

i have only two disk in this volume, and the mirror policy for the two disk is mirror on the same disk.
i extend the lvol after turn of the strict policy and i am change the number of mirror to 1 again, but after that i can't turn on the strict policy again, this message appeared when i tray to change it:

lvchange -s y /dev/vg00/lvol6
lvchange: Can not change to a more strict allocation policy
because LV "/dev/vg00/lvol6" has mirrored copies.
Is there a danger of letting the strict policy off??

thanks and best regards

thanks
sujit kumar singh
Honored Contributor

Re: Failure possibly caused by strict allocation policy

yes

This is happening as the policy for the LV /dev/vg00/lvol6 the Policy is Strict and that means that for mirroring the extenst will be assigned from a different PV in the VG on which The LV has no extents allocated.

And the Other disk does not seem to have the free PEs for this purpose.

That is why u r not able extend the LV without decreasing the mirror count.

Correctly said u need to change the policy for that LV from strict to non-strict that by using the command sequence as given below.
lvreduce -m 0 /dev/vg00/lvol6
lvchange -s n /dev/vg00/lvol6
lvetxend --- for extending the size.
after the size has extended now mirror it back.
lvextend -m 1 /dev/vg00/lvol6.

but doing this u loose the availability feature for the LV that LVM provides whwn the policy is strict.

TTr
Honored Contributor

Re: Failure possibly caused by strict allocation policy

Looking at the vgdisplay listing
> Free PE 328
> Free PE 0
> Free PE 328
The first "Free" is from the VG at the top and the other two are from the disks at the bottom. You have two disks, one has zero space left and the other has 328 extends left. The lvdisplay for lvol6 also says
> Mirror copies 0
> Stripes 0
So it looks like lvol6 is not mirrored neither it is striped. You should do a long listing of lvol6 with "lvdisplay -v /dev/vg00/lvol6 | more" and verify that it is not mirrored. If that 's the case, it does not matter where the LEs go if you extended it, so turn off the strict allocation and extend it.
mezeogu
New Member

Re: Failure possibly caused by strict allocation policy

i'd like to know what the consequence of turning off the strict cancellation policy is ?

 

i'm quite a newbie to HPUX so please pardon me...

 

we had to turn it off in order to extend a logical volume...

 

THANKS IN ADVANCE...