1826460 Members
3204 Online
109692 Solutions
New Discussion

lvreduce step

 
SOLVED
Go to solution
Elizabeth21
Advisor

lvreduce step

Hello everybody

I have a problem by lvreduce my partition:
When I have reduce my logical volume, I runned the fsck command for FS corrupted, but I have get the following error :
file system is larger than device
vxfs fsck: cannot initialize aggregate
file system check failure, aborting

Can you help me ?
thanks
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: lvreduce step

Hi:

If you have Online JFS, you must FIRST 'fsadm' the size of your filesystem to a smaller one BEFORE you 'lvreduce' the logical volume container.

If you don't have Online JFS (but you should!) then you must first backup your filesystem; then 'lvreduce' the logical volume that contains it; and then RESTORE your filesystem from the backup taken.

If you failed to follow the above caveats and you merely 'lvreduce'd your filesystem, you have corrupted it. Indeed, it appears that this is the case. You will need to 'newfs' your filesystem and reload it from a backup!

Regards!

...JRF...
Elizabeth21
Advisor

Re: lvreduce step

Thank you !

I solved making a new FS.
But I extended my ORACLE partition too and when I mount it I don't see the new dimension.
Question: Have I to make a new FS, and can I lost the data into my ORACLE ??

thanks
Patrick Wallek
Honored Contributor

Re: lvreduce step

The concept is the same when increasing an LV.

You must increase the size of the LV, then you must increase the size of the filesystem.

If you have onlineJFS you can use fsadm to increase the size on the fly.

If you don't have onilineJFS you must unmount the LV, use extendfs to increase the filesystem, then remount the LV.
Robert-Jan Goossens
Honored Contributor
Solution

Re: lvreduce step

Have a look at the lvextend, fsadm and extendfs man pages. As mentioned above you will need Online-JFS to extend a filesystem online.

A with Online-JFS
#lvextend -L 500 /dev/vg00/lvol6
#fsadm -b 500 /mount_point

without Online-JFS
#lvextend -L 500 /dev/vg00/lvol6
# umount /mount_point
# extendfs /dev/vg00/rlvol6
# mount /mount_point

Regards,
Robert-Jan
Elizabeth21
Advisor

Re: lvreduce step

thank you !
Sajjad Sahir
Honored Contributor

Re: lvreduce step


Dear Elizabeth

if u are increasing the lvm u are increasing the logical volume size only, this is not increasing u file system size
if u want to increase the file system u can
use extendfs or fsadm command
if online jfs is installed in u system u can increase the filesystem by using fsadm command
u can use swlist -l product | grep -i jfs
from these output u can understand onlinejfs is installed or not if online jfs is installed in u system use fsadm command for increasing u file system
first u have to increase the logical volume
then use fsadm command
if online jfs is not installed use extendfs command for extending filesystem
the steps u can see from the others posting

thanks and regards
Sajjad Sahir
Steven E. Protter
Exalted Contributor

Re: lvreduce step

Shalom,

Supplementary note:

If you do not have Online JFS, you can umount the file system and use extendfs to extend the file system. This extends the file system to the size of the logical volume.

lvextend
umount
extendfs
mount

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: lvreduce step

Hi (again):

Funny, this thread is about DECREASING the size of a filesystem, not enlarging it...

By the way, there is NO such word as "u" in English. It is "you".

...JRF...

Roland Piette
Regular Advisor

Re: lvreduce step

Hi Elizabeth,

An extra information when you wnat to decrease the size of a filesystem. Due the fragmentation of the data, good options in fsadm command is -d, -D, -e, and -E to reorganize the extents and the directories. When you do this you can gain some space. See man page for more details.

Regards,
Roland