Operating System - HP-UX
1747985 Members
4928 Online
108756 Solutions
New Discussion юеВ

Wrong Volume group on extend lvol

 
SOLVED
Go to solution
Belinda Dermody
Super Advisor

Wrong Volume group on extend lvol

We are running HPUX 11i with standard lvol and mirroring. We accidentally extended /dev/vg00/lvol8 (var) when we meant to extend /dev/vg01/lvol8. We noticed it when we tried the extendfs command (it came back and said it wasn't unmounted), but lvdisplay shows that it has the new size of 3600 instead of the original 2548 (which shows up when we do a bdf) for the vg00/lvol8.

My question is can we run the lvreduce on the lvol to bring it back down to 2548, or can we copy over the previous vg00.conf file under /etc/lvmconf directory ( I saved it off after the mistake was founded)
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Wrong Volume group on extend lvol

As long as you didn't actually successfully execute extendfs, you can execute lvreduce to return the extents to the available extents pool. However, be extremely careful that you do not reduce the size of the LVOL below the original size. The lvreduce command will happily obey you and you could have an instantly corrupt filesystem --- or worse, one that does not fail for several weeks or months when the space is actually needed.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Wrong Volume group on extend lvol

Hi Belinda:

Since you haven't actually extended the *filesystem* housed within the logical volume, you can 'lvreduce' the logical volume to the original size.

As a precaution you should take an Ignite backup. Some files (e.g. the '/var/adm/sw' directory and its contents in '/var') are absolutely essential to your server.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Wrong Volume group on extend lvol

I should add that you can safely execute lvreduce with the filesystem mounted --- as long as you don't reduce below the original size.
If it ain't broke, I can fix that.
tkc
Esteemed Contributor

Re: Wrong Volume group on extend lvol

can we run the lvreduce on the lvol to bring it back down to 2548?
===> yes, you can as long as you haven't start using the new space.

can we copy over the previous vg00.conf file under /etc/lvmconf directory ?
===> no, that won't work.
Amitav
Frequent Advisor

Re: Wrong Volume group on extend lvol

Belinda,
You have to do lvreduce to reduce the logical volume by:
lvreduce -L (size in mb's) /dev/vg##/lvol#

and then try lvextend on the proper logical volume....be sure when you r extending or reducing your file system....a simple mistake of your's can make the file system into an inconsistent state...

Amitav