-   Linux - Software (
-   -   how to reduce lvm in size in RHEL5.0 (

kbklinux 05-14-2009 12:35 AM

how to reduce lvm in size in RHEL5.0
Hi Friends,

Please help me in reducing the size of LVM. I did it by using the commands, lvreduce,fsck,resize2fs.After reducing the lvm size, my system is not is saying file system corrupted error.

Please help me in resolving this..

Thank you

FragInHell 05-14-2009 02:06 AM

You need to reduce the size of the filesystem first, before reducing the logical volume.

The only way out of this is to boot to a rescue disk, resize the logical volume back to the original size, and then fsck the filesystem.

Then start again.

for example to shrink from 5 GB file system to say 3GB (of course you need less than 3GB of data for this to work)

resize2fs -p /dev/vg_something/lvsomething 3G

now reduce the logical volume
lvreduce -L -2G vg_something/lvsomething

then fsck the filesystem.

Alway make sure you have a backup before doing any of this type of work!

Good luck.

All times are GMT -5. The time now is 06:49 AM.