1846734 Members
3550 Online
110256 Solutions
New Discussion

lvextend problem...

 
SOLVED
Go to solution
YOGI_3
Frequent Advisor

lvextend problem...

Hi all...
while extending one lv i am getting following error..

# lvextend -L 500 /dev/vgapp01/app1
lvextend: "LogicalExtentsNumber" is not bigger than current setting.
#

vg info as below...
# vgdisplay -v /dev/vgapp01 | more
--- Volume groups ---
VG Name /dev/vgapp01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 5
Open LV 5
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 12031
VGDA 2
PE Size (Mbytes) 4
Total PE 12030
Alloc PE 10888
Free PE 1142
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

----------------------------------------------
I think the problem is, in vgdisplay o/p== Max PE per PV = 12031 and Total PE = 12030.
Can we modify extent size of this partcular vg without unmounting and loss of data.

Urgetly waiting for reply..
yogesh
There is never a wrong time to do the right things
24 REPLIES 24
Pete Randall
Outstanding Contributor

Re: lvextend problem...

Could you post the output of "lvdisplay /dev/vgapp01/app1", please?


Pete

Pete
YOGI_3
Frequent Advisor

Re: lvextend problem...

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

#
There is never a wrong time to do the right things
Mark Nieuwboer
Esteemed Contributor

Re: lvextend problem...

Hi YOGI,

he problem looks more that you try to extend the lv with a smaller size then he now is.
I regon you want to make the filesystem 5000 MB big. Probebly you forget a 0 in the 500.

grtz. Mark
Patrick Wallek
Honored Contributor
Solution

Re: lvextend problem...

When using the '-L' option in lvextend, you must enter the NEW size of the LV. In your command you say you want to extned to LV to 500 MB. But according to your lvdisplay, that LV is already at 4504 MB. So your command didn't work.

If you want to extend the LV to 5000 MB, do:

# lvextend -L 5000 /dev/vgapp01/app1
Helen French
Honored Contributor

Re: lvextend problem...

Do you want the total size of the new LV to be 500MB? or do you want to extend another 500MB to the existing size? With lvextend you need to give the total 'new' size of the LV:

# lvextend -L 'new_size' lv_name
Life is a promise, fulfill it!
Torsten.
Acclaimed Contributor

Re: lvextend problem...

Your lvol is 4.5Gig in size and you tried to "extend" it to only 500MB!

Add a "0" to increase the size up to 5Gig.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: lvextend problem...

Hi Yogesh:

Your problem is not that you don't have the space, but rather that you are attempting to *shrink* your logical volume.

The '-L' means the number is in *megabytes* not logical extents as with '-l'. Your current size is 4,504 MB.

Remember the message said, '"LogicalExtentsNumber" is not bigger than current setting'. :-))

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: lvextend problem...

Exactly as I suspected: you're trying to extend the logical volume from 1126 extents to 500. That's not an extension, it's a reduction and that is what the message is telling you.


Pete

Pete
Devender Khatana
Honored Contributor

Re: lvextend problem...

Hi,

As stated earlier the problem is in the command issued. The size mentioned in lvextend is more than the current size, and same is clearly mentioed in the error reported by command.

Also, the value MAX_PE_PER_PV=12031 and Total_PE=12030 is not a problem.

MAX_PE_PER_PV defines the max. no. of PEs one physical volume can occupy in that VG. With one disk in a VG , the Value of Total PE can be anything equal to or less than MAX_PE_PER_PV depending upon the size of that disk.

HTH,
Devender
Impossible itself mentions "I m possible"
YOGI_3
Frequent Advisor

Re: lvextend problem...

# lvextend -L 5000 /dev/vgapp01/app1
Logical volume "/dev/vgapp01/app1" has been successfully extended.
Volume Group configuration for /dev/vgapp01 has been saved in /etc/lvmconf/vgapp01.conf
-----------------------------------
# lvdisplay /dev/vgapp01/app1
--- Logical volumes ---
LV Name /dev/vgapp01/app1
VG Name /dev/vgapp01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 5000
Current LE 1250
Allocated PE 1250
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

#
----------------------------------
# bdf | grep /dev/vgapp01/app1
/dev/vgapp01/app1 4612096 4612096 0 100% /appl

still in bdf its showing 100% AND 4.6GB ONLY
in lvdisplay its showing 5gb..how isit
There is never a wrong time to do the right things
Torsten.
Acclaimed Contributor

Re: lvextend problem...

Now you have to stop traffic to the lvol, umount the filesystem, extendfs it and mount again, unless you use an online filesystem.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Patrick Wallek
Honored Contributor

Re: lvextend problem...

You extended the LV, but you have not extended the filesystem.

If you have OnlineJFS / AdvancedJFS installed, you can try:

# fsadm -b 5000m /appl

However, since it is completely full, you will first have to free up a little bit of space. You can try the fsadm command, but if it fails you will have to temporarily move a file or files elsewhere to free up a little bit of space.

If you don't have Online JFS, then you will have to unmount the fileystem and run:

# extendfs /dev/vgapp01/rapp1

After that, remount the filesystem and your should see 5000 MB available.
Torsten.
Acclaimed Contributor

Re: lvextend problem...

in detail

# umount /dev/vgapp01/app1
# extendfs /dev/vgapp01/rapp1
# mount /dev/vgapp01/app1

If OnlineJFS is installed use fsadm, noumount needed.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Devender Khatana
Honored Contributor

Re: lvextend problem...

Hi,

You have only extended the LVOL. The file system still need to be extended. If you have online JFS installed, you can do it online uasing fsadm. If you do not have that you will be required to umount the file system and then issue a extendfs.

HTH,
Devender
Impossible itself mentions "I m possible"
YOGI_3
Frequent Advisor

Re: lvextend problem...

thanks a lot goys..
one more query that..
if a use fsadm..data will remain as it is right? there wont be any impact on data..m i right?
There is never a wrong time to do the right things
Patrick Wallek
Honored Contributor

Re: lvextend problem...

You are correct.

Extendfs has no impact on data either.
YOGI_3
Frequent Advisor

Re: lvextend problem...

I am unable to umount this file system..its giving follwing error..
how can i kill user using this fs

# cd /
# umount /dev/vgapp01/app1
umount: cannot unmount /appl : Device busy
umount: return error 1.
#
------------
There is never a wrong time to do the right things
James R. Ferguson
Acclaimed Contributor

Re: lvextend problem...

Hi :

You can use 'fuser' to kill processes that are preventing the unmount. Be careful. This is not very graceful.

I would make sure you know *what* is using the filesystem first:

# fuser -cu /mountpoint

...will show the 'pid' and user of the processes using /mountpoint.

If you do:

# fuser -k /mountpoint

...you will kill the process.

Depending on what is using the filesystem, and *IF* you don't have OnlineJFS to enable dynamically extending it, you may want to arrange for an orderly application shutdown first, before attempting to kill anything.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: lvextend problem...

You don't have onlineJFS?

try

fuser -fu /

to list the processes using the filesystem.

Since the lvol is called "app1" I assume there are running applications there. You have to stop the app...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
YOGI_3
Frequent Advisor

Re: lvextend problem...

its still giving error..
i shutdown apllications on this lv.
stillits showing device busy while umount
There is never a wrong time to do the right things
Torsten.
Acclaimed Contributor

Re: lvextend problem...

and what does

fuser -fu /

say?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: lvextend problem...

Hi (again):

You can try 'fuser -ck /dev/dsk/cXtYdZ' in lieu of specifying the filesystem directory mountpoint. Make the translation by looking at your '/etc/fstab'.

Regards!

..JRF...
Devender Khatana
Honored Contributor

Re: lvextend problem...

Hi,

Sometimes allthough you stop applications, the file system remains in use. For ex. Oracle might have been stopped but listener could still be running and that may be using the same file system. Use fuser to find out the same as mentioned earlier.

Also try using

#ps -ef|grep -i appl

HTH,
Devender
Impossible itself mentions "I m possible"
YOGI_3
Frequent Advisor

Re: lvextend problem...

hi all..
James solution works...
thanks to all...
yogesh
There is never a wrong time to do the right things