1834495 Members
3152 Online
110067 Solutions
New Discussion

pvg setup

 
SOLVED
Go to solution
Victor_5
Trusted Contributor

pvg setup

I have two lv: lvol1 and lvol2 in vg02. I am going to setup pvg for them,
bus 1 /dev/dsk/c1t5d0
bus 2 /dev/dsk/c2t5d0

Can I do it online and how?
7 REPLIES 7
Tom Geudens
Honored Contributor
Solution

Re: pvg setup

Hi,
vgextend -g bus1 vg02 /dev/dsk/c1t5d0 vgextend -g bus2 vg02 /dev/dsk/c2t5d0
should take care of the Physical Volume Groups
(there is going to be a warning that the disks are already in the volumegroup).

Check /etc/lvmpvg afterwards ...

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Sanjay_6
Honored Contributor

Re: pvg setup

Hi Victor,

You can do the pvg setup online. But if you using an existing VG and the disk you want to setup with pvg are already there in the vg, it is not possible. You can add new disks to an existing vg using pvg or you can create a new vg using pvg. you cannot manipulate disks already part of VG without loosing data.

Hope this helps.

Regds
steven Burgess_2
Honored Contributor

Re: pvg setup

Victor ,

have a look at the following

Regards

Steve
take your time and think things through
S.K. Chan
Honored Contributor

Re: pvg setup

Usually this is done upfront ..
# vgcreate -g pvg1 vg02 /dev/dsk/c1t5d0
# vgextend -g pvg2 vg02 /dev/dsk/c2t5d0
# lvcreate -s g /dev/vg02/lvol1
===> PVG-strict on
# lvextend -L 2000 /dev/vg02/lvol1 /dev/dsk/c1t5d0
===> extend it to c1t5d0

and so on ...(you would extend lvol2 to the other disk)

Since your existing LVs are already created the chances are both still sits in the same PV which defeats the whole purpose of setting up a PVG even if you can do it "online". Once PVG is setup /etc/lvmpvg file can be modify by hand. Simply vgextend another PV into the VG in a normal way and then edit /etc/lvmpvg to place it in the PVG you wanted.
steven Burgess_2
Honored Contributor

Re: pvg setup

Hi

Look at paragraphs XV and XVI

Steve
take your time and think things through
James R. Ferguson
Acclaimed Contributor

Re: pvg setup

Hi Victor:

In addition, from the man pages for 'lvmpvg (4)':

/begin_quote/

Instead of using the vgcreate and vgextend commands, the administrator can edit this file to create and extend physical volume groups.
However, care must be taken to ensure that all physical volumes to be included in the file have already been defined in their respective
volume groups by previous use of vgcreate or vgextend.

/end_quote/

Regards!

...JRF...
Roger Baptiste
Honored Contributor

Re: pvg setup

Edit /etc/lvmpvg file (or create) and add
the following entries:
**
VG vg02
PVG bus1
/dev/dsk/c1t5d0
PVG bus2
/dev/dsk/c2t5d0
**

HTH
raj

Take it easy.