1832988 Members
2713 Online
110048 Solutions
New Discussion

lvextend failing

 
EML
Advisor

lvextend failing

I'm trying to mirror one vg, but I'm getting the error when I'm mirrong one lvol:

host1:root> lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t0d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol4" could not be extended.
Failure possibly caused by strict allocation policy


All the other logical volumes have been extended to the other disk. This is the only one left, the /home. When I do it in sam, error is the same.
10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: lvextend failing

Well, let's see a vgdisplay -v, then. It just might be that you don't have enough room.


Pete


Pete
EML
Advisor

Re: lvextend failing

 
Helen French
Honored Contributor

Re: lvextend failing

From the error, I think that the PV (/dev/dsk/c1t0d0) doesn't have enough space available to create a mirror copy there. When you do a vgdisplay, it might show lot of free space in it, but if the policy is strict allocation, then you need to have enough space available on the disk(s) you specify for mirror.

Another chance is that you are trying create a mirror on the same PV itself! Check and make sure that your PV has enough space in it and your are not trying to duplicate mirror on same PV:

# pvdisplay pv_name
# lvdisplay lv_name
# vgdisplay vg_name
Life is a promise, fulfill it!
Steven E. Protter
Exalted Contributor

Re: lvextend failing

Commonly messages involving the strict allocation policy involve not having enough contiguous space.

Though there may be enough total space on the target disk, if its not in a big enough contiguous chunk it will do no good.

try Pete's command with a -v and | more on the end.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: lvextend failing

I'll concur that it's probably to do with strict allocation policy. While we're at it, I'd also like to suggest that vg00 is no place to have all those data lvols. Your root volume group should be lean and mean for simple backup and recovery purposes. When you can, you should consider moving all your application data to a separate VG.


Pete


Pete
GK_5
Regular Advisor

Re: lvextend failing

It looks c1t0d0 does not have continuous space for the mirroring. Can you provide output of
lvdisplay -v /dev/vg00/lvol4
pvdisplay -v /dev/dsk/c1t0d0
IT is great!
EML
Advisor

Re: lvextend failing

Hi GK,

Attached is the output.
Helen French
Honored Contributor

Re: lvextend failing

I checked your lvdisplay output and found the problem is exactly what I said above. You have your LV spanned across 2 PVs. Now since your c1t0d0 already has the primary copy of LV, you cannot create a mirror of that LV on the same PV!
Life is a promise, fulfill it!
Pete Randall
Outstanding Contributor

Re: lvextend failing

The problem here is that lvol4 already extends onto both disks and the allocation policy is set to strict, which means that "Mirror copies for a logical
extent are not allocated on
the same physical volume", according to the man page.

The way this is set up now, you can't mirror lvol4.


Pete


Pete
EML
Advisor

Re: lvextend failing

Thanks guys!