1824636 Members
5038 Online
109672 Solutions
New Discussion юеВ

Cannot lvextend

 
Michael Elleby III_1
Trusted Contributor

Cannot lvextend

Working on a vg trying to extend an lv in a volume group where it was set to contiguous allocation.

This vg only resides one disk, 920 of 2170 extents are avail, but I cannot lvextend the one lv in this vg. It says that no free extents are available.

Can someone help?

Thanx.
Knowledge Is Power
7 REPLIES 7
MARTINACHE
Respected Contributor

Re: Cannot lvextend

Hi,

lvdisplay /dev/vgXX/lvolXXX |grep Allocation


If the answer is contiguous, the space that you want to add must be contiguous to the orginal space.

With only one disk in this VG and if it's vg00, I suggest you to

- create an ignite tape
- boot on this tape
- modify you lvol size
- restore your vg

Regards,

Patrice.
Patrice MARTINACHE
Helen French
Honored Contributor

Re: Cannot lvextend

Hi Mike,

You have to find out the allcation policy and the amount of contiguous free physical extents with 'pvdisplay -v' command. Read this document and follow the instructions:

http://us-support.external.hp.com/cki/bin/doc.pl/sid=f47afb6011f55127c9/screen=ckiDisplayDocument?docId=200000054506937

HTH,
Shiju

Life is a promise, fulfill it!
Martin Burnett_2
Trusted Contributor

Re: Cannot lvextend

Hello Michael,

When contiguous allocation policy is set the blocks allocated MUST be contiguous. Are there any other logical volumes using the same disk? If the block(s) immediately following the original logical volume size allocation is used by anything else then the lvextend will fail.

You can use the lvchange command to change the contiguous allocation policy to no if it is not needed:

# lvchange -Cn /dev/vg00/lvol7

Then retry your lvextend command.

Thanks for participating in the forums,

Martin
Chaos reigns within. Reflect, repent, and reboot. Order shall return.
pap
Respected Contributor

Re: Cannot lvextend

Hi,
Can you please tell me which LV you are extending?
If it is not root or stand then youn can do it in following manner.

Suppose it is lv_xxx

take backup of lv_xxx.
Lvremove /dev/vg00/lv_xxx
lvcreate -n lv_xxx /dev/vg00
lvextend -L YYY /dev/vg00/lv_xxx

(YYY is size of lv required in MB)

NOw restore the backup to lv_xxx.

THere is no need to take ignite backup or anything.

It is simple and no risk. Veryfay the backup after talking it. It will be better you can take two copies of backup.

You can also take backup pf lv_XXX on some file system if the space is available in other vgs. That is safest thing to do.

Thanks,
-pap
"Winners don't do different things , they do things differently"
Darrell Allen
Honored Contributor

Re: Cannot lvextend

Hi,

Since the lv has contiguous allocation, it appears the next extents after the ones used by this lv are already allocated to another lv. You've got to move those if you want to keep contiguous allocation. Is there another disk in the vg other than the one this lv is on?

Alternatively, you can turn off contiguous allocation if it's not needed.

What's the lv? If it's for /, /stand, or swap then you should leave contiguous set.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Roger Baptiste
Honored Contributor

Re: Cannot lvextend

hi,

This can occur if there are not enough contigous extents available. Even though it has 920 extents, they may not be contiguous.

If you remove the -C option from lvcreate, it should work.

HTH
raj
Take it easy.
Michael Elleby III_1
Trusted Contributor

Re: Cannot lvextend

Yes,

I realized that there was a PVG-Strict and Continguous allocation policy set on the lv, I ran lvchange -C n and lvchange -s n to change the lv, and I was able to extend it successfully.

Thanx for all of the suggestions

Mike-
Knowledge Is Power