1752404 Members
5719 Online
108788 Solutions
New Discussion

Re: extending a LV

 
tempsample
Frequent Advisor

extending a LV

Hi

 

I want to extend the LV.

 

I have free space in VG.

 

vgdisplay /dev/vg01
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write
VG Status                   available, exclusive
Max LV                      255
Cur LV                      3
Open LV                     3
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               32000
VGDA                        2
PE Size (Mbytes)            32
Total PE                    22397
Alloc PE                    9024
Free PE                     13373
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

 

 

bdf /tech

/dev/vg01/tech
                   10485760 8392007 1964885   81% /tech

 

I am using the below commands ,, IS it correct ?

 

lvextend -L 2048 /dev/vg01/lvol1  ############ extend logical volume
fsadm -b 2048M /tech   ####### increase size to another 2 GB 

 

I am having doubt in fsadm command, Will fsadm -b 2048M increase or decresae the LV size ?


bdf /tech
vgexport -p -v -s -m /tmp/vg01.map /dev/vg01

 

online JFS is installed , and VG is in cluster so I am taking map file to secondary node.

 

 

 

 

4 REPLIES 4
tempsample
Frequent Advisor

Re: extending a LV

Hi ,

 

My understanding is

 

bdf /tech

/dev/vg01/tech
                   10485760 8392007 1964885   81% /tech

 

 

if i run  the below commands,Lv size will be increased.

lvextend -L 2048 /dev/vg01/lvol1  ############ extend logical volume
fsadm -b 2048M /tech   ####### increase size to another 2 GB

 

if i run  the below commands,Lv size will be decreased.


fsadm -b 2048M /tech   ####### decrease size to  2 GB or 2gb zise will be reduced ?

then lvreduce.

Patrick Wallek
Honored Contributor

Re: extending a LV

With both commands, lvextend and fsadm, you need to specify the NEW size of the LV.

 

If you are wanting to extend the LV by 2 GB, to 12 GB, then you need to do the following:

 

# lvextend -L 12288 /dev/vg01/lvol1

 

# fsadm -b 12288m /tech

 

tempsample
Frequent Advisor

Re: extending a LV

my current size is

 

bdf /tech

/dev/vg01/tech                    10485760 8392007 1964885   81% /tech.

 

 

I want to extend another 2 gb to /dev/vg01/tech.

 

so what value should I use in lvextend and fsadm.

Patrick Wallek
Honored Contributor

Re: extending a LV

I told you in my post above.  The values I give in the command are for a 12 GB file system (your current 10 GB + 2 GB additional space).