1832345 Members
2341 Online
110041 Solutions
New Discussion

Vgextend

 
kamal_9
Super Advisor

Vgextend

Hi All
Wish You A very Happy NewYear
# vgdisplay -v /dev/vgbs |pg
--- Volume groups ---
VG Name /dev/vgbs
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 4
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 1279
VGDA 6
PE Size (Mbytes) 8
Total PE 3837
Alloc PE 2546
Free PE 1291
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
but Iam facing problem while doing lvextend .if i give
#lvextend -L 12288 /dev/vgbc/lvbahtmp
it says
lvextend: not enough free physical extends available
logical volume /dev/vgbc/lvbahtmp could not be extended balonging to vgbc /dev/vgbc
Failure caused by strict allocation policy
can u tell me what it means.How to overcome from this
For Details Pls go thru this also
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=774511









http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=774511
13 REPLIES 13
Sanjay Kumar Suri
Honored Contributor

Re: Vgextend

You have only 1291 * 8 = 10328 MB space whereas what is specified in vgextend (-
L) is more.

Is that the reason of the error?

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ravi_8
Honored Contributor

Re: Vgextend

Hi Kamal

It's pretty simple,
The existing free space in your disk right now is (FREE PE * PE SIZE) 1291*8= 10328
i.e 10GB.
where as in lvextend you are specifying the lvol lvbahtmp to increase by 12GB (12288MB).

hence the error, so you have to specify the lesser space (< 10GB) in lvextend command or you have to add another disk
never give up
kamal_9
Super Advisor

Re: Vgextend

Sorry I extended other Filesystem for 2gb that why now the free pe is showing less.
I tried by giving
#lvextend -L 8192 /dev/vgbc/lvbahtmp
for that also iam getting the same error
that 2gb has got extended because earlier it self before doing vgextend itself i was having 5gb free space in that vg .that 2gb got extened to that one
YESTERDAY VGDISPLAY OUTPUT BEFOER DOING VGEXTEND
In vgdisplay -v iam getting the following output
VG Name /dev/vgbs
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 4
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 1279
VGDA 4
PE Size (Mbytes) 8
Total PE 2558
Alloc PE 1876
Free PE 682 (2GB GOT EXTENED TO THIS )
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

Sanjay Kumar Suri
Honored Contributor

Re: Vgextend

Check this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=67237


sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ravi_8
Honored Contributor

Re: Vgextend

Hello

Do u know the LVM concepts?

Free space in your disk is less than the size you need, hence the error
never give up
kamal_9
Super Advisor

Re: Vgextend

Hi
Thank You for your quick replay .
Is thr any other way i can extend that lv
I tried to extend that lv by using the specify the harddisk option in sam .but thr also i got the same error and i asked to select 2 hdd .but i doing hav free PE in other the PV
Eventhough if i select the other hdd which Pe is fully utalized and the new pv which is fully free .will it automatically arrage the PE to both of the disk .Or will it lead to any data loss .
kamal_9
Super Advisor

Re: Vgextend

Hi Ravi
I think you didn't understand my probelm
With
#lvextend -L 8128 /dev/vgbc/lvbahtmp is also giving the same error
the vgdisplay which pasted is the current status in the server.
#lvextend -L 12288 /dev/vgbc/lvbahtmp
it says
after failing of this command .I tried extending other FS for 2gb .It got extended sucessfully.but it extended in the old PV ie.already i was having 5gb free space in that vg before extending that vg .it 2gb got extended to thta space .now my probelm is iam not able to utalize my new PV space.
I hope Now u understand
Marco Santerre
Honored Contributor

Re: Vgextend

Could you provide us with a lvdisplay of the LV you're trying to extend?
Cooperation is doing with a smile what you have to do anyhow.
kamal_9
Super Advisor

Re: Vgextend

Pls hav the lvdiplay output
Marco Santerre
Honored Contributor

Re: Vgextend

I have a feeling that your striping might be what's causing the issue here but not being a 100% sure.. I'd like to know where your Free Extents are located. Can you provide a vgdisplay with the free extents on each disks please?
Cooperation is doing with a smile what you have to do anyhow.
kamal_9
Super Advisor

Re: Vgextend

Hi Marco
For me also it sounds like the strict/stripping policy problem.Iam having free PE in my last Pv which i added newly.I tried by doing the lvextend to that particular PV using the specify hdd option in the sam.But thr also iam getting the same error .and it asking me to select 2 disk.But i dont hav free PE in any other PV.
Marco Santerre
Honored Contributor

Re: Vgextend

Unfortunately, I'm not an expert in striping, but that what it sure looks like to me. Seeing that your LV is configure to do striping over two PV, it probably looks for the amount you asked for over two PV and if you don't have it, then youd' get the strict policy message. Seeing that you have 6 extents left on your first two disk (I know it's not much but just to prove that our problem is really one of striping), I would try and extend those 6 extents.

The only other option I can see is adding one more disk in that VG.
Cooperation is doing with a smile what you have to do anyhow.
Matthew F. Carr
Occasional Advisor

Re: Vgextend

Can you attach the current vgdisplay after you did some extending?

I think the last couple posts are on the right track but I want to be sure.

Basically you have a VG that is striped across two disks with a strict allocation policy which will prevent you from making mirrors on the PV or PVG. Because of the striping, its going to want to keep that consistancy so its not going to let you specify a disk to extend onto because that would screw up the striping. That is not something you can change with an lvchange either once its in place. Striping is good for performance but also introduces so problems as you can see. The number you use also needs to be a multiple of numbers of disks involved in the striping so for 12288 mb, you are talking about 1536 PE or 768 on each disk (b/c of the number of stripes in the lvdisplay). There is no way you can bring in this third disk into this striping because the striping could never work anymore.

If you goal is to retire these other disks, than I would recommend creating an new lvol and using cpio to move the data over. You can do that by: lvcreate -n [name] -s y -L [size] /dev/vg[vgname] then mount it to some temporary directory and cpio.

If you goal isn't to retire the disks, than I would still just recommend cpio. A little different procedure though and I think you are going to need more disk to do this. Basically, create an lvol large enough to house all of the data currently in this other lvol all on one disk (or multiple disks if one isn't big enough). This should be done on disks that you aren't using for any other purpose right now, perferably in another VG. Once you confident in the data, blow away the other old lvol and recreate it using the -i 3 option which will give the lvol striping across three disks. If you aren't concerned about the striping, just use the -D y option and it will distributed it across the disks anyway. Once you have this created, cpio all the data back onto this lvol and you should be good to go.

I hope this helps and more importantly, made at least a little sense. -Matt