Re: extending logical volume (50 Views)
Reply
Frequent Advisor
newunix
Posts: 107
Registered: ‎01-25-2010
Message 1 of 22 (50 Views)
Accepted Solution

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


Regular Advisor
Jestin John Chacko
Posts: 157
Registered: ‎03-19-2009
Message 2 of 22 (50 Views)

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
Honored Contributor
Johnson Punniyalingam
Posts: 2,246
Registered: ‎09-22-2008
Message 3 of 22 (50 Views)

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
Regular Advisor
Durvesh Mendhekar
Posts: 93
Registered: ‎10-23-2008
Message 4 of 22 (50 Views)

Re: extending logical volume

Hi,

Need more information

vgdisplay -v "vgname"
strings /etc/lvmtab

Regards,
Durvesh M.
Regular Advisor
subodhbagade
Posts: 132
Registered: ‎06-08-2008
Message 5 of 22 (50 Views)

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.
Frequent Advisor
newunix
Posts: 107
Registered: ‎01-25-2010
Message 6 of 22 (50 Views)

Re: extending logical volume

hi subodhbagade

how to find out the max value of logical extent and how to find if online jfs installed
Honored Contributor
Johnson Punniyalingam
Posts: 2,246
Registered: ‎09-22-2008
Message 7 of 22 (50 Views)

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
Regular Advisor
subodhbagade
Posts: 132
Registered: ‎06-08-2008
Message 8 of 22 (50 Views)

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&...



Regards,
Subodh.

Honored Contributor
Johnson Punniyalingam
Posts: 2,246
Registered: ‎09-22-2008
Message 9 of 22 (50 Views)

Re: extending logical volume

Online JFS - Package its Licensed product
Problems are common to all, but attitude makes the difference
Frequent Advisor
newunix
Posts: 107
Registered: ‎01-25-2010
Message 10 of 22 (50 Views)

Re: extending logical volume

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

Super Advisor
Super Advisor
AVV
Posts: 211
Registered: ‎03-23-2008
Message 11 of 22 (47 Views)

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.

Trusted Contributor
Vishu
Posts: 407
Registered: ‎03-27-2007
Message 12 of 22 (47 Views)

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!!!
Super Advisor
Super Advisor
AVV
Posts: 211
Registered: ‎03-23-2008
Message 13 of 22 (47 Views)

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.
Regular Advisor
Durvesh Mendhekar
Posts: 93
Registered: ‎10-23-2008
Message 14 of 22 (47 Views)

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
Frequent Advisor
newunix
Posts: 107
Registered: ‎01-25-2010
Message 15 of 22 (47 Views)

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
Frequent Advisor
Amitav
Posts: 55
Registered: ‎08-27-2007
Message 16 of 22 (47 Views)

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.
Frequent Advisor
sahir_1
Posts: 37
Registered: ‎12-30-2009
Message 17 of 22 (47 Views)

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
Frequent Advisor
newunix
Posts: 107
Registered: ‎01-25-2010
Message 18 of 22 (47 Views)

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
Honored Contributor
Johnson Punniyalingam
Posts: 2,246
Registered: ‎09-22-2008
Message 19 of 22 (47 Views)

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
Frequent Advisor
Amitav
Posts: 55
Registered: ‎08-27-2007
Message 20 of 22 (47 Views)

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.

Frequent Advisor
sahir_1
Posts: 37
Registered: ‎12-30-2009
Message 21 of 22 (46 Views)

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
Honored Contributor
Johnson Punniyalingam
Posts: 2,246
Registered: ‎09-22-2008
Message 22 of 22 (46 Views)

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
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.