1825764 Members
2073 Online
109687 Solutions
New Discussion

Adding luns to vgs

 
SOLVED
Go to solution
Sanjiv Sharma_1
Honored Contributor

Adding luns to vgs

Hi All,

I have a 840 GB vg02 consisting of 12 nos. 70 GB luns. I have a single stripped logical volume of 840 GB with 4 Luns at a time with stripe size 64 KB. I want to increase the logical volume and hence I need to add some more luns to vg02.

I would like to know that I need to add 4 nos. 70 GB luns or I can add 4 nos. 50 GB or any other size luns to vg02 and extend the logical volume.

Thank you for your help.
Everything is possible
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Adding luns to vgs

You can add LUN/Drives (physical volumes) of any size BUT if you add larger drives/LUN's than the volume group was originally created with and if you did not set max_pe's high enough then you might be in a situation where only part of the new drives are actually used. In your case, because you are adding smaller drives than you created the VG with, all of the extents can be used.

It's always a good idea when creating a new VG to add the largest drive(s) first. You are good to go.
If it ain't broke, I can fix that.
Michael Tully
Honored Contributor

Re: Adding luns to vgs

Your best bet is to create a new volume group(s) and start using the new volumes from there. Using new LUN's in an existing volume group can be a terrible mistake. When volume groups are created, the maximum usuable size of any LUN added later can only be to the same maximum size of the first LUN added. One mistake that can be made is creating the LUN sizes from the disk too large. Doing that you may tend to loose flexibility particularly if the machine is shared.
Anyone for a Mutiny ?
Sanjiv Sharma_1
Honored Contributor

Re: Adding luns to vgs

Hi,

Thanks for your suggestion.

I want to add the following for more clarity.

# vgdisplay -v vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available, exclusive
Max LV 5
Cur LV 1
Open LV 1
Max PV 200
Cur PV 12
Act PV 12
Max PE per PV 2170
VGDA 24
PE Size (Mbytes) 32
Total PE 26040
Alloc PE 26040
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use
.....

# lvdisplay -v /dev/vg02/lvol1
--- Logical volumes ---
LV Name /dev/vg02/lvol1
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule striped
LV Size (Mbytes) 833280
Current LE 26040
Allocated PE 26040
Stripes 4
Stripe Size (Kbytes) 64
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c34t0d0 2170 2170
/dev/dsk/c32t0d1 2170 2170
/dev/dsk/c34t0d2 2170 2170
/dev/dsk/c32t0d3 2170 2170
/dev/dsk/c34t0d4 2170 2170
/dev/dsk/c32t0d5 2170 2170
/dev/dsk/c34t0d6 2170 2170
/dev/dsk/c32t0d7 2170 2170
/dev/dsk/c7t8d5 2170 2170
/dev/dsk/c10t9d2 2170 2170
/dev/dsk/c34t8d5 2170 2170
/dev/dsk/c32t9d2 2170 2170

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c34t0d0 00000 current
00001 /dev/dsk/c32t0d1 00000 current
00002 /dev/dsk/c34t0d2 00000 current
00003 /dev/dsk/c32t0d3 00000 current
00004 /dev/dsk/c34t0d0 00001 current
00005 /dev/dsk/c32t0d1 00001 current
00006 /dev/dsk/c34t0d2 00001 current
00007 /dev/dsk/c32t0d3 00001 current
.......
Everything is possible
Michael Tully
Honored Contributor

Re: Adding luns to vgs

Going by your original post you have a number of LUN's being 50Gb.
You existing volume group has LUN's that are 8GB in size. If you attempted to add a 50Gb LUN to volume that had 8Gb LUN's to begin with, the maximum amount of space you will get from the new 50Gb LUN's is 8Gb. Suggest you look at creating new volume group(s)
You should also look at the 'pvtimeout' value of the new LUN's as well. These should be set to at least 180 seconds. Have a look at the 'pvchange' man page for details.
Anyone for a Mutiny ?
Sanjiv Sharma_1
Honored Contributor

Re: Adding luns to vgs

Micheal,

I believe you missed
PE Size (Mbytes) 32

Everything is possible
Sridhar Bhaskarla
Honored Contributor

Re: Adding luns to vgs

Hi Sanjiv,

YOu can add any sized (maximum will be 70GB used per LUN ofcourse)but a minimum of 4 LUNs to your vg02 and extend the striped logical volume. You can specify the LUNs in the command volume so that LVM won't take action on it's own.

lvextend -L new_size /dev/vg02/lvolx /dev/dsk/c9t0d0 /dev/dsk/c9t0d1 /dev/dsk/c9t0d2 /dev/dsk/c9t0d3

c9t0dx is for example. You can even add 4x 8GB LUNs. But the size you will get is only 32GB more.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Adding luns to vgs

Hi Sanjiv,

I would have added. You need to add a multiple of 4 (or Number of Stripes) disks and each can be of any size. Say they are 8,16,32 and 50GB. In this case, you can be able to take only 8GB from each disk as the stripes have to be extended on all four LUNs and the first LUN can only accommodate 8GB.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try