1837090 Members
2635 Online
110112 Solutions
New Discussion

Re: lvreduce

 
Sridhar R
Regular Advisor

lvreduce

Hi,

I am in process of reducing a lvol size from 6 GB to 5 GB.

I perforemed,

#umount /app
#lvreduce -L 5120 /dev/vg00/lvol4


I got a warning stating that data corruption will occur. But still i gave yes, since i don't have any data...

It gave me a message "lvol successfully reduced".

But, when i tried mounting file system again, it gave me an error:

#mount /dev/vg00/lvol4 /app

It gives me the message:

"vxfs mount: /dev/vg00/lvol4 is corrupted. needs checking"

I wasn't able to mount back the file system.

As a result of this, i performed an lvremove and lvcreate.

But, why am i unsuccessful with lvreduce.

Did i miss anything?

Thanks!



4 REPLIES 4
Torsten.
Acclaimed Contributor

Re: lvreduce

The problem is, when you reduce the size of the lvol, you will cut/destroy/corrupt the file system on this lvol. That's why you get the error while mounting. Without online jfs you are not able to reduce the file system size, so you need to re-create the filesystem (this will finally destroy the data on it, for this reason you get the warning from lvreduce).

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!   
psreedhar
Frequent Advisor

Re: lvreduce

Before reducing the LVOL you "should" have reduced the file system on that, other wise data loss will happen.
Sridhar R
Regular Advisor

Re: lvreduce

HI,

I Just missed a line before mounting.

#newfs -F vxfs -o largefiles /dev/vg00/rlvol4

And then, did a

#mount /dev/vg00/lvol4 /app


I was able to see the lvol size reduced from the bdf output.

Thanks for the replies!
Sridhar R
Regular Advisor

Re: lvreduce

Thnx