cancel
Showing results for 
Search instead for 
Did you mean: 

reduce LV size

masood bt
Regular Advisor

reduce LV size

 

Migrating data from one disk to another disk

 

The existing disk size(LV size as well) for vg-ABCD = 263424 MB = 4116 PEs (Physical extents)

The new disk’s size for this VG =  262144 MB = 4096 PEs only

 

Difference is 1.25 GB

 

The filesystems usage is just 6%

 

So I want to reduce the original LV size and then do the migration...

I have online JFS (and vxfs)

 

from another thread:

Reduce file system /dev/vgprod/lvred to 6GB = 6,291,456 (6,144,000)

I am confused at the fsadm command options...

2) fsadm -d -D -e -E mount-point
3) fsadm -F vxfs -b 6144000 mount-point (whats that 6144000 next to b)
4) lvreduce -L 6000 /dev/vgprod/lvred

 

 

I want to reduce the existing LV size from 263424 MB to 261120 MB

How do I do that?

Behind every Great fortune, there is a crime
4 REPLIES
Robert_Jewell
Honored Contributor

Re: reduce LV size

The following should work:

 

# fsadm -b 261120m /mnt-point

# lvreduce -l 4096 /dev/vgxx/lvxx

 

(the number next to the -b is the size you wish to set the filesystem to.  the 'm' specifies megabytes).

 

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
masood bt
Regular Advisor

Re: reduce LV size

thanks.....

 

can you tell me why do I see this legacy naming convention after

I did a vgextend and

lvextend -m 1....

 

I was expecting :

 

vgdisplay -v vgname |grep "PV Name"

PV Name                     /dev/disk/existingdisk

PV Name                     /dev/disk/newdisk

 

But what I see is

 

PV Name                     /dev/dsk/c0t2d0
PV Name                     /dev/dsk/c0t5d0

 

 

Behind every Great fortune, there is a crime
Robert_Jewell
Honored Contributor

Re: reduce LV size

You are saying it changed?

 

Post the output of 'vgdisplay -v vgname' and 'lvmadm -l'

 

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
masood bt
Regular Advisor

Re: reduce LV size

 

Got rid of legacy naming convention(cxtxdx) and got agile nameing convention (/dev/disk/disk) by executing this command

 

vgdsf -c vgname

 

thanks anyways

Behind every Great fortune, there is a crime