Operating System - HP-UX
1829068 Members
2634 Online
109986 Solutions
New Discussion

Re: Strange on lvextend command

 
SOLVED
Go to solution
Gordon_3
Regular Advisor

Strange on lvextend command

Hi all,

I hit a strange problem on LVM extend issue, refer below screen, it's clear that I still get very enough space on this VG, however, I cannot extend the LV with below msg, any idea on what happen? Thx.

Gordon

hkgbkup3:/#vgdisplay vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 28
Open LV 28
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 20000
VGDA 6
PE Size (Mbytes) 4
Total PE 52494
Alloc PE 34576
Free PE 17918
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

hkgbkup3:/#bdf |grep ignite
/dev/vg02/Fignite 23552000 13526596 9712172 58% /home/sysadm/ignite
hkgbkup3:/#lvextend -L 25000 /dev/vg02/Fignite
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg02/Fignite" could not be extended.
Failure possibly caused by strict allocation policy
Gordon
9 REPLIES 9
Balaji N
Honored Contributor
Solution

Re: Strange on lvextend command

hi,
problem is could be due to the LV allocation policy.

1. Could you please give the output of lvdisplay for the LV Fignite and vgdisplay -v output or the free PE's available om all the disks.
2. you could change the LV allocation policy using lvchange and then try to extend the LV.
HTH
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Ravi_8
Honored Contributor

Re: Strange on lvextend command

Hi Gordon

have you enabled large file system option for Fignite file system
never give up
Gordon_3
Regular Advisor

Re: Strange on lvextend command

Hi 2,

Thx for yr help, below is lvdisplay, yes, it's a large files system.

Gordon

--- Logical volumes ---
LV Name /dev/vg02/Fignite
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 23000
Current LE 5750
Allocated PE 11500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Gordon
T G Manikandan
Honored Contributor

Re: Strange on lvextend command

Mirror copies=1

The logical volume you are trying to extend is mirrored.
If it is mirrored then (It should be twice the space)

Please provide the details of
vgdisplay -v /dev/vg02.

Balaji N
Honored Contributor

Re: Strange on lvextend command

Hi,
Your Allocation policy is strict. Which means, "Mirror copies for a logical extent are not allocated on the same physical volume." (from the man page.).

So you need to have enough space on two different physical volumes to extend your LV. Alternatively you could change your LV allocation policy using lvchange to non-strict and extend ur LV ( i would nt recomond doing this).
hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
monasingh_1
Trusted Contributor

Re: Strange on lvextend command

If it is mirrored LV then you will need to have two different disks each having at least the space differential (25000 - old size). If not then you can try doing lvchange -D n for this lv before doing the lvextend..
monasingh_1
Trusted Contributor

Re: Strange on lvextend command

sorry about the previous lvchange -D n , you will need to do lvchange -s n for this lv...
T G Manikandan
Honored Contributor

Re: Strange on lvextend command

check this doc


PROBLEM
The lvextend command on a striped logical volume returns with the following
error message:

/dev/vgxx/lvolxx could not be extended.
failure possible caused by strict allocation policy

RESOLUTION
The problem is due to the fact that the lvol is striped over several disk. In
order to extend a logical volume all involved disks have to have equal amount
of free space available.

Here is an example:

Assume /dev/vg01/lvol1 is 4gb and striped across c1t5d0 and c1t6d0 with
each of these disks being 2gb PVs.
Now you want to increase the lvol by another 1gb. Conventional
thought would indicate that you should add another disk but actually you
must add 2 more disks to satisfy the policy requirement of striping.

After you added 2 disks, i.e. c1t3d0 and c1t4d0, the syntax for the lvextend
command looks like:

lvextend -L 5000 /dev/vg01/lvol1 /dev/dsk/c1t3d0 /dev/dsk/c1t4d0

Note that you have to specify the 2 disks. A single disk would complain
about the strict allocation policy. You cannot turnoff this policy when
striping. This prevents you from striping to the same disk. This is an
lvm limitation.


The following commands will help to determine your configuration:

1) lvdisplay /dev/vgxx/lvolxx shows the information over how many disks the
lvol is striped and what the stripe size it.

# lvdisplay -v /dev/vgxx/lvolxx

--- Logical volumes ---
LV Name /dev/vgxx/lvolxx
VG Name /dev/vgxx
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1600
Current LE 400
Allocated PE 400
Stripes 2
Stripe Size (Kbytes) 5000
Bad block on
Allocation strict
IO Timeout (Seconds) default


2) pvdisplay /dev/dsk/cxtxdx will tell you how many free PE's are available on
the disks.

# pvdisplay /dev/dsk/cxtxdx

PV Name /dev/dsk/c0t8d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 5
PE Size (Mbytes) 4
Total PE 500
Free PE 0
Allocated PE 500
Stale PE 0
IO Timeout (Seconds) 120







T G Manikandan
Honored Contributor

Re: Strange on lvextend command