1838243 Members
3509 Online
110125 Solutions
New Discussion

Problen extending lvol3

 
Simon Qu
Frequent Advisor

Problen extending lvol3

Hi,
I need to restore an Oracle DB with 30 GB to lvol3 but I don't have enough space in Lvol3 only 20 GB.

lvextend -l 750 /dev/vg03/lvol3 /dev/dsk/c4t2d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg03/lvol3" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy

How to extend lvol3 by using free using free PE in /dev/dsk/c4t2d0

Thanks
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: Problen extending lvol3

Post the output of:
lvdisplay /dev/vg03/lvol3
and:
vgdisplay -v /dev/vg03

A very typical situation is that the LVOL is mirrored and while there are enough free extents in total to allow the LVOL to be extended, there are not enough to allow the mirrors to be on separate disks. The output of the two requested commmands should tell the tale.
If it ain't broke, I can fix that.
S.Rider
Regular Advisor

Re: Problen extending lvol3

We've seen this alot lately where the original lvol is striped across x disks, and the free space left in the vg is NOT striped across sufficient disks.
Ride Boldly Ride, but watch out for El Dorado's
Steven E. Protter
Exalted Contributor

Re: Problen extending lvol3

Shalom,

You could try using a smaller figure for -l, I think its likely you don't have enough free extents on the disk /dev/dsk/c4t2d0

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
Simon Qu
Frequent Advisor

Re: Problen extending lvol3

Here is the output

dr12w / lvdisplay /dev/vg03/lvol3
--- Logical volumes ---
LV Name /dev/vg03/lvol3
VG Name /dev/vg03
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 20480
Current LE 2560
Allocated PE 2560
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict/contiguous
IO Timeout (Seconds) default
dr12w / vgdisplay -v /dev/vg03
--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4341
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 4864
Free PE 3816
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg03/lvol1
LV Status available/syncd
LV Size (Mbytes) 5120
Current LE 640
Allocated PE 1280
Used PV 2

LV Name /dev/vg03/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg03/lvol3
LV Status available/syncd
LV Size (Mbytes) 20480
Current LE 2560
Allocated PE 2560
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t14d0
PV Status available
Total PE 4340
Free PE 628
Autoswitch On

PV Name /dev/dsk/c4t2d0
PV Status available
Total PE 4340
Free PE 3188
Autoswitch On
Simon Qu
Frequent Advisor

Re: Problen extending lvol3

dr12w / vgdisplay -v /dev/vg03
--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4341
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 4864
Free PE 3816
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg03/lvol1
LV Status available/syncd
LV Size (Mbytes) 5120
Current LE 640
Allocated PE 1280
Used PV 2

LV Name /dev/vg03/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg03/lvol3
LV Status available/syncd
LV Size (Mbytes) 20480
Current LE 2560
Allocated PE 2560
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t14d0
PV Status available
Total PE 4340
Free PE 628
Autoswitch On

PV Name /dev/dsk/c4t2d0
PV Status available
Total PE 4340
Free PE 3188
Autoswitch On
dr12w / lvdisplay /dev/vg03/lvol3
--- Logical volumes ---
LV Name /dev/vg03/lvol3
VG Name /dev/vg03
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 20480
Current LE 2560
Allocated PE 2560
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict/contiguous
IO Timeout (Seconds) default

Simon Qu
Frequent Advisor

Re: Problen extending lvol3

Lvol3 is not mirrored and I like to use free PE from C5t14d0
Sundar_7
Honored Contributor

Re: Problen extending lvol3

Oh I think I know what the problem is.

With lvextend, you need to specify the **FINAL SIZE** of the LV, not the amount by which you would like to extend the LV.

lvol3 already has 2560 extends. If you would like to extend this to 30 GB then

lvextend -L 30720 /dev/vg03/lvol3 /dev/dsk/c4t2d0.
Learn What to do ,How to do and more importantly When to do ?
Sundar_7
Honored Contributor

Re: Problen extending lvol3

Ofcourse, if you would like to specify the extends, you will need to use the -l option

lvextend -l 3840 /dev/vg03/lvol3 /dev/dsk/c4t2d0
Learn What to do ,How to do and more importantly When to do ?
Simon Qu
Frequent Advisor

Re: Problen extending lvol3

Hi

Still same problem
dr12w / lvextend -L 30720 /dev/vg03/lvol3 /dev/dsk/c4t2d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg03/lvol3" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy
dr12w / lvextend -L 30720 /dev/vg03/lvol3 /dev/dsk/c4t2d0.
A. Clay Stephenson
Acclaimed Contributor

Re: Problen extending lvol3

The commands I had you run make your problem obvious. It's the contiguous allocation policy. This means that PE's must be allocated so that there are no gaps AND all extents must be contained in a single physical volume. The rule is relaxed a bit for mirrored contiguous LVOL's but only that each mirror must reside in a separate physical volume. Unless there is some reason for your contiguous allocation policy then:
lvchange -C n /dev/vg02/lvol3
and you should then be able to extend the LVOL.
If it ain't broke, I can fix that.
Simon Qu
Frequent Advisor

Re: Problen extending lvol3

Clay,

thanks a lot. It did work
thanks to all of you guys