Operating System - HP-UX
1753359 Members
6468 Online
108792 Solutions
New Discussion

Re: lv reduce from a particular disk problem

 
Abhijit.A
Occasional Advisor

lv reduce from a particular disk problem

We have one lv in the vg. We need to extend the lv by 2gb. So we added one 8gb disk in the vg. But unfortunately we extended the lv by 8gb. So right now we need get back the 6gb space. We didn't run fsadm and the F.S is online.

Need help how to reduce excess 6gb space from the lv

4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: lv reduce from a particular disk problem

Hi:

 

As long as you didn't extend the filesystem you can simply 'lvreduce' to the size you desire.  Since you did not extend the filesystem, the extents that 'lvreduce' will return to the free pool have nothing you need.

 

Regards!

 

...JRF...

Abhijit.A
Occasional Advisor

Re: lv reduce from a particular disk problem

Previously lv size was 40gb. Now it is 48 gb. 40gb lv is mounted & working. If i want to reduce it to 42gb, is there any impact to the online F.S or we need to umount the F.S. We run lvextend, but we didn't run fsadm. So lv is extended but is not reflect on mount pt. as i was not run fsadm.

James R. Ferguson
Acclaimed Contributor

Re: lv reduce from a particular disk problem


@Abhijit.A wrote:

Previously lv size was 40gb. Now it is 48 gb. 40gb lv is mounted & working. If i want to reduce it to 42gb, is there any impact to the online F.S or we need to umount the F.S. We run lvextend, but we didn't run fsadm. So lv is extended but is not reflect on mount pt. as i was not run fsadm.


As I said before, simply 'lvreduce'.  You do not need to unmount the filesystem.  The filesystem boundries are where they were before you 'lvextend'ed the logical volume.

 

It never hurts to have a backup before doing LVM operations.

 

Regards!

 

...JRF...

Abhijit.A
Occasional Advisor

Re: lv reduce from a particular disk problem

Thanks for your reply...

could you please tell me how could i use lvreduce command in this case, means is it require any lv range to be specified....?