LVM and VxVM

Strict allocation policy problem

Go to solution
Super Advisor

Strict allocation policy problem

Running into this when mirroring a logical volume, what could be the case? Has the original been created with the strict allocation policy? Can this be fixed?

sbapc1:/#: lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c0t4d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol8" could not be extended.
Failure possibly caused by strict allocation policy

<10 Points>
A. Clay Stephenson
Acclaimed Contributor

Re: Strict allocation policy problem

The problem is that while you may have enough total free extents to allow the LVOL to be extended there are not enough free extents on separate physical volumes to ensure that all the extents are mirrored on separate PV's. This is actually a good thing because it prevents a single disk failure from causing the loss of data. You can "fix" the problem by using lvchange to disable the strict allocation policy but that is really not something that you want to do. With strict allocation disabled, mirroring does little good.
If it ain't broke, I can fix that.
Ivan Ferreira
Honored Contributor

Re: Strict allocation policy problem

You can use lvchange -s to set the allocation policy. Just remember then strict policy set to yes is recommended for data availability.

Please post the output of vgdisplay -v vg00.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Honored Contributor

Re: Strict allocation policy problem

You asked
>> Has the original been created with the strict allocation policy?
Can you tell what you are doing ? Is the volume lvol8 already mirrored ? [ lvdisplay -v /dev/vg00/lvol8 | grep -i mirror ]

The message indicates that disk having at least one of the mirror copy does not have enough free blocks. But mu question is if you already have a mirror what are you trying to do with the command you have posted ?

Darrel Louis
Honored Contributor

Re: Strict allocation policy problem


I assume that the disks are identical.
It's not wise do disable strict allocation policy.
Can you check with vgdisplay -v vg00 and lvdisplay -v /dev/vg00/ the status.

Steven E. Protter
Exalted Contributor

Re: Strict allocation policy problem


Mirroring is useless when you mirror the content to the same drive.

The purpose of mirroring is to not lose data or system availability when a single disk fails.

If a logical volume called lvol3 (usually root) is on disk /dev/dsk/c0t0d0 and you make a mirror copy on /dev/dsk/c0t0d0 you have essentially wasted the disk space and not improved reliablity at all.

vgdisplay /dev/vg00


vgdisplay -v /dev/vg00

Come up with a plan to redo all of your mirroing so that the logical volume you mirror ends up with the mirror copy on a different disk, perferably a different controller, eg c1 versus c0

Steven E Protter
Owner of ISN Corporation
Super Advisor

Re: Strict allocation policy problem

It looks like the problem is that that
logical volume in question is location on 2
different PVs. Even though I have enough
physical extents, I cannot mirror it.

Trusted Contributor

Re: Strict allocation policy problem

Hello etc,

does the lvdisplay show the allocation policy as PVG-strict/strict.

Then just give the
# lvextend -m 1 /dev/vg00/lvol8
LVM will ensure that the mirroring is proper.

else post the lvdisplay /dev/vg00/lvol8


Valued Contributor

Re: Strict allocation policy problem

Check if the PVG-strict allocation policy is set (man lvcreate, option -s). If so you need to have the file /etc/lvmpvg where the PVG (physical volume groups) are defined. see "man lvmpvg"
What i did a while ago is the following;
- break mirrors to free a disk
- use pvmove to copy LE to the free disk till you have the extends free you need for extending lvol8 (in your case)
- extend lvol8
- use pvmove to copy the LE back to the first PV in the VG
[ optional: create PVG ]
- recreate the mirrors