Operating System - HP-UX
1837197 Members
2642 Online
110115 Solutions
New Discussion

Re: Extending a mirrored logical volume

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

Extending a mirrored logical volume

Hi,

Please help to get through a stupid LVM error.

I use mirrored LVM volume group with strict/contigious alloaction, it is located on two physycal volumes.
I'd like to extend one of logical volumes using free space on these two disks. lvol5 is followed by some other logical volumes, then
there is contigious free space.

I've already checked Document id: KBAN00000084 Document description: lvextend: Not enough free physical extents available.


# lvextend -L 750 /dev/vg00/lvol5
Warning: rounding up logical volume size to extent boundary at size "752" MB.
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol5" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy



# vgdisplay -v
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 4312
Free PE 4368
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

...

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 700
Current LE 175
Allocated PE 350
Used PV 2

.................


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

PV Name /dev/dsk/c1t6d0
PV Status available
Total PE 4340
Free PE 2184
Autoswitch On


Thanks and points in advance!
KISS - Keep It Simple Stupid
6 REPLIES 6
Sudeesh
Respected Contributor

Re: Extending a mirrored logical volume

Hi,
From vgdisplay o/p, I see there is enough free space available in vg00. 2184*4MB space available for the mirrored logical volume.

I think the reason for lvextend failure is continuous Logical Extends are not available to extend the vg (even though you have free space at the end of disk). You can confirm this by:

lvdisplay -v /dev/vg00/lvol5
lvdisplay -v /dev/vg00/lvol6

note the end and start extend number for lvol5 and lvol6.

If this is your root volume, suggested method is to take ignite backup and during restore you can resize the lvol.


Sudeesh




The most predictable thing in life is its unpredictability
Artyom Voronchihin
Respected Contributor
Solution

Re: Extending a mirrored logical volume

Hello!

You can't simple extend contiguous LV followed by other LVs.

The first way out is to change allocation policy using lvchange(1m).
# lvchange -C n /dev/vg00/lvol5

The second one is to brake the mirror, create new VG structure on one of the PVs, move data from previous VG to new created and then restore the mirror. This requires reboot and a lot of configuration work.

The third on is to create ignite tape with whole vg00, boot from it into interractive restore and enter desired sizes of LVs. After restore you also need to recreate the mirror.
"Intel inside" is not a label, it's a warning.
Bharat Katkar
Honored Contributor

Re: Extending a mirrored logical volume

Hi,
I think there is no contiguous space avaible for lvol5 to extend and since it is strict/contigoud it won't extend.
You can confirm this by lookign at:

# lvdisplay -v /dev/vg00/lvol5

See where your last LE point to which PE.
Note the next PE number. Then look at other lv's also to confirm whether any of thgem point to this PE.

Also have a look at:
# pvdisplay -v /dev/dsk/cxtydx

Hope that helps.
Regards,


You need to know a lot to actually know how little you know
Mihails Nikitins
Super Advisor

Re: Extending a mirrored logical volume

So, do you affirm that free extents must follow lvol5? Documentation on this issue seemed to me a bit foggy. If so, I really should do some configuration work.

lvdisplay -v /dev/vg00/lvol5

LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c1t6d0 00256 current /dev/dsk/c2t6d0 00256 current
00001 /dev/dsk/c1t6d0 00257 current /dev/dsk/c2t6d0 00257 current
....
00174 /dev/dsk/c1t6d0 00430 current /dev/dsk/c2t6d0 00430 current

lvdisplay -v /dev/vg00/lvol6

00000 /dev/dsk/c1t6d0 00431 current /dev/dsk/c2t6d0 00431 current
...
00499 /dev/dsk/c1t6d0 00930 current /dev/dsk/c2t6d0 00930 current

pvdisplay -v /dev/dsk/c1t6d0
pvdisplay -v /dev/dsk/c2t6d0

...
0430 current /dev/vg00/lvol5 0174
0431 current /dev/vg00/lvol6 0000
...
2155 current /dev/vg00/lvol9 0767
2156 free 0000
...
4339 free
KISS - Keep It Simple Stupid
Pedro Cirne
Esteemed Contributor

Re: Extending a mirrored logical volume

Hi,

That's true, you don't have contiguous free PE to extend lvol5.

Is lvol5 you /tmp? I don't see any need to have it contiguous, you can change policy to non contigous and then extend lvol:

#lvchange -C n /dev/vg00/lvol5
#lvextend -L 750 /dev/vg00/lvol5

Enjoy :)

Pedro
Mihails Nikitins
Super Advisor

Re: Extending a mirrored logical volume

Thanks to all of you. Seems it is very stupid to have preinstalled systems with contigious allocation policy and plenty of unalloacated place.

Congratulations to Artyom! My points raised him to the next hat.
KISS - Keep It Simple Stupid