Operating System - HP-UX
1751921 Members
4852 Online
108783 Solutions
New Discussion юеВ

Re: extending logical volume

 
SOLVED
Go to solution
AVV
Super Advisor

Re: extending logical volume

Hi,

You can extend/create the LV more than your one PV as systems takes whole disks as one and it is possible for you to create LV more than 100Gb.

I try to explain you little more.
Do a vgdisplay of your VG
# vgdisplay vgname

You may get some fields below. Look at the PE size (may be 4/8...MB) and see the Free PE column. You can multiply the PE Size*Free PE to get the maximum vg space on that VG.
You can create that much big single LV or many LVs untill it comes to the peak (conditions apply).In your case, I assume it may show you near to 400Gb or little less.
create the lv using lvcreate command
#lvcreate -L -n name /dev/vgxx. Then newfs.
If you extend the same, use lvextend and fsadm.

You can see your Online JFS as below.

#swlist -l product | grep -i online

or

#swlist | grep -i online

This shows you the Online JFS if installed. Else you have to install the same. If you does not have the online JFS, you have to take the backup of the LV and remove/recreate it with the required size. Restore the backup.

Vishu
Trusted Contributor

Re: extending logical volume

Hi,

PV is the disk itself.

and regarding the answer for your first post, YES, you can extend an LV more than 100GB if you have free space left in there irrespective of the size of PV, bcoz LV expansion is totally dependent on VG's total space.

Enjoy!!!
AVV
Super Advisor

Re: extending logical volume

Hi,

Physical volume means the disk itslef. vgdisplay will show you the number of disks in that VG and in your case it should be 4 as below.


Cur PV 4
Act PV 4


#vgdisplay -v vgxx | grep "PV Name"

Gives you the device files associated with it.
Durvesh Mendhekar
Regular Advisor

Re: extending logical volume

Hi,

Physical volume is disk itself.
When you create VG you have to do pvcreate on a disk to create a LVM information on it.

Regards
Durvesh
newunix
Frequent Advisor

Re: extending logical volume

you can extend an LV more than 100GB if you have free space left in there irrespective of the size of PV, bcoz LV expansion is totally dependent on VG's total space.======>>>>>>>>


how to calculate vg total size

>vgdisplay -v /dev/vg121
--- Volume groups ---
VG Name /dev/vg121
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 1016
VGDA 2
PE Size (Mbytes) 16
Total PE 255
Alloc PE 192
Free PE 63
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 254g
VG Max Extents 16256

--- Logical volumes ---
LV Name /dev/vg121/lvolredoCN1
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg121/lvolredoCN2
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1

LV Name /dev/vg121/lvolredoCN3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 64
Used PV 1


--- Physical volumes ---
PV Name /dev/disk/disk60
PV Status available
Total PE 255
Free PE 63
Autoswitch On
Proactive Polling On
Amitav
Frequent Advisor

Re: extending logical volume

Hi,
Yes u can extend a lv of 100GB or more, provided u've free space on that particular VG.

How to calculate free space on a particular VG:

vgdisplay /dev/vgxx

where xx is the name of the VG

concentrate on 2 fields: Max PE per PV & PE Size (Mbytes)

Now multiply those two values corresponding to the above fields, which will give u the free space available in MB's.
sahir_1
Frequent Advisor

Re: extending logical volume

Hi,

As per your vgdisplay output,Free PE is 63 and PE size is 16MB. So you have 1008MB(63x16) space free can be used.

So run the following for creating a new LV by using this full space.

# lvcreate -L 1008 -n "lvname" /dev/vg121

or

if u want to extend any existing LV (all LV names and mount points are an exmaple here. Use approporiate)

# umount /dev/vg121/lvol1 - here lvaname is an example
# lvextend -L 1008 /dev/vg121/lvol1
# extendfs -F vxfs /dev/vg121/rlvol1
# mount /dev/vg121/lvol1 /test

Thanks

All the Best..

Sahir
newunix
Frequent Advisor

Re: extending logical volume

logical volume can be expanded or reduced in size as needs change if not cobfigured as contiguos

whats the exact meaning

can i have a example command
Johnson Punniyalingam
Honored Contributor

Re: extending logical volume

>>logical volume can be expanded or reduced in size as needs change if not cobfigured as contiguos<<<

Yes you right


Example :-

/dev/vg00/lvol3 -> refering to /root file system
or swap,

First of all /stand, swap space and / need to contigeous.

In order to increase any of them, you will have to use ignite and
resize the partition
Problems are common to all, but attitude makes the difference
Amitav
Frequent Advisor

Re: extending logical volume

There are various allocation types, depending upon the requirement...plz read the docs to clarify the things...for eg /root FS is allocated Contiguously.