Operating System - HP-UX
1753365 Members
6089 Online
108792 Solutions
New Discussion юеВ

Re: creation of PVG based VG

 
SOLVED
Go to solution
Sreer
Valued Contributor

creation of PVG based VG

Hi Gurus,
Its for my testing based environment.
I have a 11.31 box
with two controllers.
my plan is I should have a PVG as below:

VG vg0x
PVG pvg1
/dev/dsk/c3t2d0
PVG pvg2
/dev/dsk/c5t0d2

I need to create a VG with the pvg based.
I have checked many docs but not getting the exact one to begin my learning in lvm pvg
I tried as
after creating the vg controlfile,tried to create vg:
vgcreate -s 64 -g pvg1 pvg2 /dev/vg01 /dev/dsk/c3t2d0
/dev/dsk/c5t0d2

but its not working..

could you guide me on this?


In short my requirement is to create a vg with pVG policy.

Rgds
Sree
8 REPLIES 8
vishnu.khandare
Respected Contributor

Re: creation of PVG based VG

Hi Sree,

U have PV:/dev/dsk/c3t2d0
PV:/dev/dsk/c5t0d2

To create a VG fro this two PV, run belo commands,
#pvcreate -f /dev/rdsk/c3t2d0
#pvcreate -f /dev/rdsk/c5t0d2
#mkdir /dev/vg0X ; X u can give any no
#mknod /dev/vg0X/group c 64 0x0X0000
#vgcreate -p 60 -s PE_size -e 12500 /dev/vg0X /dev/dsk/c3t2d0
/dev/dsk/c5t0d2
Now this will create a VG vg0X
U can create logival volume under it as per ur req.

Hope this solves ur query.

Regards
Vishnu Khandare

You should deserve before U desire!!!!
Sreer
Valued Contributor

Re: creation of PVG based VG

Hi Vishu,
Thnaks for the reply.
What you given is a normal vg creation..But my requirement is a vg with PVG!!!!

Rgds
Sree
Manix
Honored Contributor
Solution

Re: creation of PVG based VG

The pvgs must have been created like this
vgcreate -g pvg1 /dev/vgname /dev/dsk/c5t8d0 /dev/dsk/c5t9d0
vgextend -g pvg2 /dev/vgname /dev/dsk/c7t1d0 /dev/dsk/c7t2d0

Then when creating volumes you can do
lvcreate -m 1 -n volname -L size_in_mb -s g /dev/vgname

id you want to do RAID 0 + 1 then you can
mention "-s g & -D Y" while lv creation
but then you need at least two disks in each PVG as shown.
HP-UX been always lovable - Mani Kalra
nijokj
Trusted Contributor

Re: creation of PVG based VG

PVGs are usually used to group PV by controller to increase performance. LV can be mirrored two different PVGs. This is controlled by the -s option (strictness) of lvextend -m

As per your scenario

VG vg0x
PVG pvg1
/dev/dsk/c3t2d0
PVG pvg2
/dev/dsk/c5t0d2

# vgcreate -g pvg1 -s 32 /dev/vg0x /dev/dsk/c3t2d0

vgextend -g pvg2 -s 32 /dev/vg0x /dev/dsk/c3t2d0

lvcreate -m 1 -s g -L size -n lv_name /dev/vg0x
Torsten.
Acclaimed Contributor

Re: creation of PVG based VG

No no no.

This will create a VG "pvg1", not a PVG!

The lvmpvg file is a plain text file.
You need to create it (by vi or ...).

For 2 disks it doesn't make much sense.


VG vg0x
PVG pvg1
/dev/dsk/c3t2d0
PVG pvg2
/dev/dsk/c5t0d2



With some more disks it makes much more sense.

It is basically used to mirror "pvg1" to "pvg2" without specifying the certain disks.


See the man page also!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: creation of PVG based VG

Sorry, I really need to clean my glasses ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sreer
Valued Contributor

Re: creation of PVG based VG

Hi,

All I succeeded to create the VG with Pvg characteristics.
now my querry is :

do we need minimum 2 disks in each pvg to full fill the lv creation with PVG characteristics????

Or tleast 1 disk is enough ?

I tried to use just 10 LEs but Iam getting errors!!!

# lvcreate -n lvdata -l 10 -s g -D y /dev/vg0x
Logical volume "/dev/vg0x/lvdata" has been successfully created with
character device "/dev/vg0x/rlvdata".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg0x/lvdata" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.
[rx26-206]/
#

But see there is enough space in both disks.

# vgdisplay -v /dev/vg0x
--- Volume groups ---
VG Name /dev/vg0x
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 1093
VGDA 4
PE Size (Mbytes) 64
Total PE 1156
Alloc PE 0
Free PE 1156
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1093g
VG Max Extents 17488


--- Physical volumes ---
PV Name /dev/dsk/c5t0d3
PV Status available
Total PE 63
Free PE 63
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c3t2d0
PV Status available
Total PE 1093
Free PE 1093
Autoswitch On
Proactive Polling On


--- Physical volume groups ---
PVG Name pvg1
PV Name /dev/dsk/c5t0d3

PVG Name pvg2
PV Name /dev/dsk/c3t2d0

Thnx for help

Rgds
Sree
Manix
Honored Contributor

Re: creation of PVG based VG

>># lvcreate -n lvdata -l 10 -s g -D y /dev/vg0x

as i said earlier if you are using " -D y"
distributive extent based striping you need
even no of disks at each PVG.

for PVG strict mirror - what you want to do as
told so far,i think below command should work


# lvcreate -n lvdata -l 10 -s g /dev/vg0x
HP-UX been always lovable - Mani Kalra