Operating System - HP-UX
1753906 Members
9451 Online
108810 Solutions
New Discussion юеВ

Re: Extending lv when have pv links

 
SOLVED
Go to solution
Dhananjaya Amarakoon
Regular Advisor

Extending lv when have pv links

Dear Friends.

I have a requirement to extend a one of LV size of the following VG in my server (Rx7620, HP-UX v11.23).
Here I have attached the vgdispaly output.

--- Volume groups ---
VG Name /dev/vgevabscs01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 4
Act PV 4
Max PE per PV 3839
VGDA 8
PE Size (Mbytes) 8
Total PE 15356
Alloc PE 13880
Free PE 1476
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vgevabscs01/lvol1
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 2500
Allocated PE 2500
Used PV 1

LV Name /dev/vgevabscs01/lvol2
LV Status available/syncd
LV Size (Mbytes) 91040
Current LE 11380
Allocated PE 11380
Used PV 4


--- Physical volumes ---
PV Name /dev/dsk/c16t0d5
PV Name /dev/dsk/c17t0d5 Alternate Link
PV Name /dev/dsk/c21t0d5 Alternate Link
PV Name /dev/dsk/c22t0d5 Alternate Link
PV Status available
Total PE 3839
Free PE 0
Autoswitch On

PV Name /dev/dsk/c17t0d6
PV Name /dev/dsk/c21t0d6 Alternate Link
PV Name /dev/dsk/c16t0d6 Alternate Link
PV Name /dev/dsk/c22t0d6 Alternate Link
PV Status available
Total PE 3839
Free PE 0
Autoswitch On

PV Name /dev/dsk/c21t0d7
PV Name /dev/dsk/c16t0d7 Alternate Link
PV Name /dev/dsk/c17t0d7 Alternate Link
PV Name /dev/dsk/c22t0d7 Alternate Link
PV Status available
Total PE 3839
Free PE 0
Autoswitch On

PV Name /dev/dsk/c16t1d0
PV Name /dev/dsk/c17t1d0 Alternate Link
PV Name /dev/dsk/c21t1d0 Alternate Link
PV Name /dev/dsk/c22t1d0 Alternate Link
PV Status available
Total PE 3839
Free PE 1476
Autoswitch On


As in the output we can see, the space available in 4th physical volume only.
What my fist question is if we issue following command

lvextend тАУl 12856 /dev/vgevabscs01/lvol2

Is it automatically detected that space available only in 4th pv and allocate requested space from there?

Second one is if I need to specify to lvextend forcefully to allocate new space from 4th PV
then which PV name should I use ? Do I need to use

lvextend тАУl 12856 /dev/vgevabscs01/lvol2 /dev/dsk/c16t1d0 ( is it enough to spacify main pv name?)

or

Do I need to use other Alternate link of 4th PV also?

lvextend тАУl 12856 /dev/vgevabscs01/lvol2 /dev/dsk/c16t1d0 /dev/dsk/c17t1d0 /dev/dsk/c21t1d0 /dev/dsk/c22t1d0


Thanks you very much if you can able to give answers above ones.

Thanks & Regards
Dhananjaya Amarakoon.
4 REPLIES 4
Aneesh Mohan
Honored Contributor

Re: Extending lv when have pv links

1)>lvextend l 12856 /dev/vgevabscs01/lvol2

Is it automatically detected that space available only in 4th pv and allocate requested space from there?


< Yes , If the lvol is not in strict policy ..then it can be possible without any issues.


2)
>Second one is if I need to specify to lvextend forcefully to allocate new space from 4th PV
then which PV name should I use ? Do I need to use

lvextend l 12856 /dev/vgevabscs01/lvol2 /dev/dsk/c16t1d0 ( is it enough to spacify main pv name?)

or

Do I need to use other Alternate link of 4th PV also?

< I feel better to use all PV links while doing lvextend or vgextend


Thanks,

Aneesh
Sandman!
Honored Contributor

Re: Extending lv when have pv links

>Is it automatically detected that space available only in 4th pv and allocate
>requested space from there?

Yes LVM will extend the LVOL onto the first available PV with free extents which in this case hapens to be the 4th PV.

>Second one is if I need to specify to lvextend forcefully to allocate new space
>from 4th PV then which PV name should I use ?

If you wanted to extend the LVOL onto a specific PV then the syntax would be:

# lvextend -l 12856 /dev/vgevabscs01/lvol2 /dev/dsk/cXtYdZ

>Do I need to use other Alternate link of 4th PV also?

You can use any of the PV name(s) that are associated with the fourth PV. BTW all of these questions have been answered in the lvextend(1M) manpage.

~hope it helps
Dhananjaya Amarakoon
Regular Advisor

Re: Extending lv when have pv links

Hi Thanks for the answers..

Regarding my secound question, Please tell me when I forcefully specified 4th PV Should I use all PV links in one command (lvextend -l 12856 /dev/vgevabscs01/lvol2 /dev/dsk/c16t1d0 /dev/dsk/c17t1d0 /dev/dsk/c21t1d0 /dev/dsk/c22t1d0)

or should I use one of exisiting PV link(s) only ?

Thanks & Regards
Dhananjaya Amarakoon.
Sandman!
Honored Contributor
Solution

Re: Extending lv when have pv links

You do not have to specify all the PV names that are associated with the 4th PV as they all refer to the same device. You are fine with using one of the existing PV link names only. Hope that answers your question?

~cheers