1834925 Members
2691 Online
110071 Solutions
New Discussion

lvreduce

 
Keely Jackson
Trusted Contributor

lvreduce

Hi

I have just increased in size the wrong logical volume. Stupid or what - don't answer that. Anyway, having read other threads on this, I gather in general that using lvreduce is not a good idea. However, as I have only just increased the lv and nothing is likely to have used the space, am I ok to reduce it or not? I have on-line jfs and os is 10.20

Thanks
Keely

Live long and prosper
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: lvreduce

Hi Keely,

You should be safe in this case.

Pete

Pete
Sandip Ghosh
Honored Contributor

Re: lvreduce

If you are sure that ng has been written on the disk after you have increased the lv, you can take a chance to reduce the lv. But be careful don't reduce more than whatever you have increased. It may require a fsck.

Sandip
Good Luck!!!
James R. Ferguson
Acclaimed Contributor

Re: lvreduce

Hi Keely:

If you have done an 'lvextend' but nothing more (i.e. no 'fsdm'), you have not affected the filesystem; only the container in which it sits. In this case, you can safely 'lvreduce' to your *exact* original size.

For insurance, of course, make a backup first!

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: lvreduce

Hi Keely,

Take a backup, just in case. The n try a lvreduce.

But it is not such a good idea. you should be doing an lvremove and then recreate the lv.

Hope this helps.

Regds
Helen French
Honored Contributor

Re: lvreduce

I would do a backup first. You will be able to reduce the LV without issues, if you haven't done anything after lvextend. While reducing it, clearly specify the original space. Check the FS with 'fsck' command, once everything is set right.

2 cents ..
Life is a promise, fulfill it!
Victor_5
Trusted Contributor

Re: lvreduce

Yes, in your case, you can use lvreduce safely, good luck!
Martin Johnson
Honored Contributor

Re: lvreduce

Do a backup just in case! It better to be safe than sorry.


Marty
Bill McNAMARA_1
Honored Contributor

Re: lvreduce

In all of the cases I've tested on, lvreduce is okay ONCE you defrag first (with fsadm). Apart from the obvious (don't defrag first) The only time I've seen trouble was when a failing CPU started screwing things up (on the defrag).

However, if you haven't modified your filesystem (in any way) the space should still be unused.

As the others suggest, backup, a quick tar to tape is always good to have.

Later,
Bill
It works for me (tm)
Jim Turner
HPE Pro

Re: lvreduce

Hi Keely,

I agree with Pete, Jim, et. al. As long as you have NOT extended the filesystem and have only just extended the LV, you can lvreduce back to the original size with no damage. I have done this successfully.

Cheers,
Jim
MANOJ SRIVASTAVA
Honored Contributor

Re: lvreduce

Hi Keely


If you have just meaning like ( no reboots , file deletes and file creation on the lvol ) then you can safely reduce it.


Manoj Srivastava
Juan Manuel López
Valued Contributor

Re: lvreduce

I think is very important have a tape make_recovery done.
On case to use lvreduce, do not forget use newfs command to create a ew fs with the new lv size properties.

If you wants the commands or more information, ask me.

Juanma.

I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.