Operating System - HP-UX
1834499 Members
2393 Online
110068 Solutions
New Discussion

URGENT! lvextend fails...

 
Erik Voelker_1
Advisor

URGENT! lvextend fails...

trying to extend lvol on 10.20 system, I have plenty of disk space available.
I'm receiving the error:
lvextend: "LogicalExtentsNumber" is not bigger than current setting.

anyone know whats wrong?
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: URGENT! lvextend fails...


You need to put a new and higher value on the lvextend command, your error indicates your trying to extend it smaller than it already is !

lvextend -l is in extents (4MB each, so 1000 = 4 GB)
lvextend -L is in Megabytes (eg 4000 = 4 GB)
Im from Palmerston North, New Zealand, but somehow ended up in London...
Santosh Nair_1
Honored Contributor

Re: URGENT! lvextend fails...

What is the exact command you're using? Sounds like you're trying to extend the LV to a smaller size. Check the size of the LV using lvdisplay and make sure that the new size is bigger.

-Santosh
Life is what's happening while you're busy making other plans
Bill McNAMARA_1
Honored Contributor

Re: URGENT! lvextend fails...

do an lvdisplay /dev/vgXY/lvolZ

before you lvextend.
The Big L is Mega
small l pe's

See an example:
# mount -p
/dev/vg00/lvol3 / vxfs log 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 0
/dev/vg00/lvol8 /var vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol7 /usr vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol4 /tmp vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol6 /opt vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol5 /home vxfs delaylog,nodatainlog 0 0
/dev/vg00/lvol9 /debug vxfs delaylog,nodatainlog 0 0

# lvdisplay /dev/vg00/lvol7
--- Logical volumes ---
LV Name /dev/vg00/lvol7
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1148
Current LE 287
Allocated PE 287
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 56837 81137 41% /
/dev/vg00/lvol1 83733 34489 40870 46% /stand
/dev/vg00/lvol8 1200000 840524 340007 71% /var
/dev/vg00/lvol7 1175552 651709 491142 57% /usr
/dev/vg00/lvol4 500000 70604 402721 15% /tmp
/dev/vg00/lvol6 2048000 1178081 815564 59% /opt
/dev/vg00/lvol5 20480 8218 11564 42% /home
/dev/vg00/lvol9 2048000 658242 1302960 34% /debug

# vgdisplay vg00
--- 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 1
Act PV 1
Max PE per PV 2500
VGDA 2
PE Size (Mbytes) 4
Total PE 2169
Alloc PE 2079
Free PE 90
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

I've got 90 free PS's
GREAT!!

Ahhh remember lvextend -l NEW SIZE!!!!

# lvextend -l 350 /dev/vg00/lvol7
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f

not:
# lvextend -l 90 /dev/vg00/lvol7
lvextend: "LogicalExtentsNumber" is not bigger than current setting.

# fsadm -F vxfs -b 1200000 /usr
fsadm: /dev/vg00/rlvol7 is currently 1175552 sectors - size will be increased

I could have gone more but...
(if this fs extension doesn't work for you get onlineJFS)

It's an example
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 56837 81137 41% /
/dev/vg00/lvol1 83733 34489 40870 46% /stand
/dev/vg00/lvol8 1200000 842572 338087 71% /var
/dev/vg00/lvol7 1200000 651717 514054 56% /usr
/dev/vg00/lvol4 500000 70604 402721 15% /tmp
/dev/vg00/lvol6 2048000 1178081 815564 59% /opt
/dev/vg00/lvol5 20480 8218 11564 42% /home
/dev/vg00/lvol9 2048000 658242 1302960 34% /debug

It works for me (tm)
Roger Baptiste
Honored Contributor

Re: URGENT! lvextend fails...

Erik,

Bill's response is comprehensive.
One related note: I prefer to give the
size in "Megabytes" rather than "number
of extents" to avoid confusion.
So, for instance, if you already know
your existing LV size as 100Mb, to extend
it to 150MB, you simply specify
lvextend -L 150 /dev/vg*/lv* .

Also, note that the size you give in
lvextend command should be the "NEW SIZE"
and **not** the "increment". For
instance, you should not specify
lvextend -L 50 in the above example;
lvextend -L 150 would be the correct format.

In all probability, this is the cause of
your error.

-raj
Take it easy.
Sridhar Bhaskarla
Honored Contributor

Re: URGENT! lvextend fails...

Erik,


One mistake that is commonly done most of the time is to specify the "increment" size with the lvextend command. We need to specify the new size(current + incremental)

For ex., if the LV is of 200 MB and if we want to extend it to 300, we need to specify 300 as an argument to -L.

lvextend -L 300 /dev/vgxx/lvolx
extendfs /dev/vgxx/rlvolx

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Timothy Czarnik
Esteemed Contributor

Re: URGENT! lvextend fails...

Erik,

Also, if the logical volume is mirrored, a request to extend it will take double the amount of space from the volume group as you specify.

-Tim
Hey! Who turned out the lights!
James R. Ferguson
Acclaimed Contributor

Re: URGENT! lvextend fails...

Hi Erik:

On point more (an aside, perhaps). Remember that 1MB = 1024 KB. Thus, one standard 4MB extent = 4096 KB. Thus, if you were to allocate a logical volume with '-l 24' you would see 96MB reflected in the "LV Size" from an 'lvdisplay', but 98.304 MB in the "kbytes" of a 'bdf'.

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: URGENT! lvextend fails...

Hi Eric,

You are trying to extend the lv to a size smaller or equal to the present size of that LV. Check the syntax of your command. If you are using "L", you specify the size in MB. If you use "l" you specify the size in extend. By default eack extent is 4MB in size.

Hope this helps.

Thanks