Operating System - HP-UX
1784540 Members
1557 Online
109157 Solutions
New Discussion

Re: extending logical volume

 
SOLVED
Go to solution
newunix
Frequent Advisor

extending logical volume

new to unix

total disk size is 400 gb

4 physical volume 100 gb each

is it possiable to extend a logical volume more than 100 gb assigned to a physical volume


21 REPLIES 21
Jestin John Chacko
Regular Advisor

Re: extending logical volume


Hai...

For getting out of these confusions first get in to the concept of volume groups and logical volumes

this document may help you in this

http://docs.hp.com/en/B2355-90672/ch03s10.html

hope this will help you to get a basic idea
Johnson Punniyalingam
Honored Contributor

Re: extending logical volume

>>is it possiable to extend a logical volume more than 100 gb assigned to a physical volume>>>

more information like

# vgdisplay -v /dev/vg_name -> if you can post output

and which file system or logical volume you want to extend -> output we advice accordingly

# bdf /file_system_1 ..2 ..3 ..4
Problems are common to all, but attitude makes the difference
Durvesh Mendhekar
Regular Advisor

Re: extending logical volume

Hi,

Need more information

vgdisplay -v "vgname"
strings /etc/lvmtab

Regards,
Durvesh M.
subodhbagade
Regular Advisor
Solution

Re: extending logical volume

Hi,

(1)Check whether you are having free space in your VG ( PE size * Free PE)

(2)Check who is accessing the LV using
#fuser â cu /mount point

(3)Unmount the LV
#umount lv_name
#kill â 9 pid if device is busy

(4)Extending LV
# lvextend â L final_size /dev/vg/lvname

(5)Extending FS
#extendfs â F /dev/vg/rlvol

(6)mount /mount_point

Above steps you can follow if you donot have online JFS

(7) With OnlineJFS you do not need to umount. Use fsadm instead:

# fsadm -b

(8)Each logical volume having limitation of logical extent i.e 655535 , beyond this you can not extend the LV.

Hopes this will help you to extend LV.


Regards,
Subodh.
newunix
Frequent Advisor

Re: extending logical volume

hi subodhbagade

how to find out the max value of logical extent and how to find if online jfs installed
Johnson Punniyalingam
Honored Contributor

Re: extending logical volume

>>how to find out the max value of logical extent and <<

# lvdisplay -v /dev/vgxx/lvolxx -> can give you more information

man lvdisplay

>>how to find if online jfs installed <,

Example :-

# swlist -l product |grep -i jfs
JFS B.11.11 The Base VxFS File System
OnlineJFS B.11.11.03.03 Online features of the VxFS File System
PHKL_24026 1.0 JFS Filesystem swap corruption
PHKL_29115 1.0 JFS Direct I/O cumulative patch
PHKL_30366 1.0 JFS3.3;ACL patch
PHKL_34805 1.0 JFS3.3 patch; mmap
PHKL_35329 1.0 JFS3.3 edquota performance improvement
PHKL_35933 1.0 Panic extending JFS3.3 filesystem past 12

Problems are common to all, but attitude makes the difference
subodhbagade
Regular Advisor

Re: extending logical volume

Hi,

(1)Max value of LE of each LV is 65535 , you can get this value from

# vgdisplay â v /dev/vgname.

LV Name /dev/vg00/software
LV Status available/syncd
LV Size (Mbytes) 4416
Current LE 276
Allocated PE 276
Used PV 1


(2) Please refer below link for more info of online JFS


http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1264412349946+28353475&threadId=1371631



Regards,
Subodh.

Johnson Punniyalingam
Honored Contributor

Re: extending logical volume

Online JFS - Package its Licensed product
Problems are common to all, but attitude makes the difference
newunix
Frequent Advisor

Re: extending logical volume

is physical volume is like a disk or its a disk itself..

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.

sahir_1
Frequent Advisor

Re: extending logical volume

Hi,

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

If a logical volume is to be used for root, boot, primary swap, or dump, the physical
extents must be contiguous, which means that the physical extents must be allocated
in increasing order with no gaps on a single physical volume.

Non-contigous Logical Volume only can expand more than a Physical volume.

All the Best

Sahir
Johnson Punniyalingam
Honored Contributor

Re: extending logical volume

>>can i have a example command<<

Check with "lvdisplay" command

$ /usr/sbin/lvdisplay -v /dev/vg00/lvol3 |more
--- Logical volumes ---
LV Name /dev/vg00/lvol3
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1024
Current LE 32
Allocated PE 64
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

or

$ /usr/sbin/lvdisplay -v /dev/vg00/lvol3 |grep -i Allocation
Allocation strict/contiguous
Problems are common to all, but attitude makes the difference