Operating System - HP-UX
1848377 Members
3445 Online
104025 Solutions
New Discussion

Re: lvextend says 'lvol too large'

 
SOLVED
Go to solution
Brad Marks
Super Advisor

lvextend says 'lvol too large'

Howdy guys 'n' gals,
I'm trying to reduce the size of /dev/vg00/lvol9 from 1gb. 100mb. Here's what it looks like via bdf: /dev/vg00/lvol9 1024000 28297 933533 3% /usr2

When I execute "lvreduce -L 100 /dev/vg00/lvol9" I get the following error msg: "Warning: The Logical Volume has a file system larger than the reduced size.
Reducing the Logical Volume will cause filesystem corruption.
When a logical volume is reduced useful data might get lost"
Since I've a backup of the lvol, can I safely ignore this erroneous error?

Thanx in advance,
Brad
It's not impossible -- it'll just cost more...
9 REPLIES 9
Brad Marks
Super Advisor

Re: lvextend says 'lvol too large'

By the way, I meant to say that I'm reducing from 1g. TO 100mb.
Thanx
It's not impossible -- it'll just cost more...
Sanjay_6
Honored Contributor
Solution

Re: lvextend says 'lvol too large'

Hi Brad,

If you have backed up the existing data on the lv, it would be good for you to remove the lv complete using "lvremove" and then add another lv using "lvcreate" rather than reducing the size of an existing LV. We normally use lvreduce to reduce the mirror and such and not to reduce the lv size.

Hope this helps.

Regds
Sridhar Bhaskarla
Honored Contributor

Re: lvextend says 'lvol too large'

Hi Brad,

Though the used up space is on 28MB, lvreduce always warns us due to the fragmentation of the file system.

**It is not advised to reduce the file system without using OnlineJFS****

If you have OnlineJFS, you can do

#fsadm -b 102400 /usr1
#lvreduce -L 100 /dev/vg00/lvol9

will take care of your business

If you don't have OnlineJFS, I would suggest to backup the 28MB to another file system temporarly, destroy lvol9 and recreate it with 100MB and then copy the data back. This is the safest procedure.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Joseph C. Denman
Honored Contributor

Re: lvextend says 'lvol too large'

I would normally remove the lvol and recreate it. Gives me the warm fuzzy to newfs. However, you should not have a problem. Use the -f option.

...jcd...
If I had only read the instructions first??
Sanjay_6
Honored Contributor

Re: lvextend says 'lvol too large'

Hi Brad,

you should still be able to reduce the size of the LV if you want. If you are getting errors check the patch level on your system. you may be in need of some LVM patches.

Hope this helps.

Regds
Helen French
Honored Contributor

Re: lvextend says 'lvol too large'

Hi,

As far as you have the data backup, you can reduce the LV. You need to create file system after you reduce the LV and then copy back the data.

My suggestion is to remove the entire LV (lvremove) and recreate the new LV with 100 MB, create new FS and copy back the data.

HTH,
Shiju
Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: lvextend says 'lvol too large'

Hi Brad:

You need to restore the filesystem's data on the logical volume you 'lvreduce'. The warning message is meant as a reminder to you!

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: lvextend says 'lvol too large'

Hi (again) Brad:

I should hasten to add that (having backed up the data you wish to keep), 'lvreduce' the logical volume and *then* create a new smaller filesystem with 'newfs' before reloading your data.

Regards!

...JRF...
Uday_S_Ankolekar
Honored Contributor

Re: lvextend says 'lvol too large'

Hi
If you have online JFS then below is the step for Lvreduce


Reducing an HP OnlineJFS File System

fsadm -F vxfs -b [lv_size_MB]M /mountdirectory

NOTE: You need to add M directly to the lv_size_MB.

Reduce the logical volume to the needed size:

# lvreduce -L [lv_size_MB] /dev/vg01/lvol5

Check the size of the reduced file system:

# bdf

To reduce the size of a logical volume without online JFS (advanced JFS)
Note: the following example is using the volume group vg01 and the logical volume lvhome
1) Backup all user data
2) Umount the filesystem
umount /home
3) Reduce the size
lvreduce -L 60 /dev/vg01/lvhome
Note: the new total size will be 60M.
4) Re-create the filesystem
newfs -F vxfs /dev/vg01/rlvhome
Note: to create an hfs filesystem change vxfs by
hfs in the previous command.
5) Mount the Logical Volume:
mount /dev/vg01/lvhome /home
6) Restore the user data




-USA..
Good Luck..