Operating System - HP-UX
1753797 Members
7304 Online
108799 Solutions
New Discussion юеВ

Re: How to create a Physical Volumen Group.

 
FOBF
Frequent Advisor

How to create a Physical Volumen Group.

Hi.

I have a doubt, i have my vg00 in lvm mirror and i need to extend a FS but i do not have enough Free PE so i have to add another disk extend my vg00 in order to extend my lvol and fs too. So far i am ok, but my question is, if i add another disk into vg00 in order to extend 2 filesystem, how it will work the copy into mirror disk, i need to mantain the mirror in all filesystem from vg00?
I was asking and HP says, that i have to create a PVG (create a pairs), i think, one pair to VG00 with 2 disks and the other pair to mirror copy of VG00?

Any advice, thanks a lot
6 REPLIES 6
Johnson Punniyalingam
Honored Contributor

Re: How to create a Physical Volumen Group.

Hi,

>>but my question is, if i add another disk into vg00 in order to extend 2 filesystem, how it will work the copy into mirror disk, i need to mantain the mirror in all filesystem from vg00?
I was asking and HP says, that i have to create a PVG (create a pairs), i think, one pair to VG00 with 2 disks and the other pair to mirror copy of VG00?

>>that i have to create a PVG (create a pairs)<<

meaning you need add two pshyical volume

# pvcreate /dev/rdsk/cxtxdx /dev/rdsk/cxtxdx
# vgextend /dev/vg00 /dev/rdsk/cxtxdx /dev/rdsk/cxtxdx
# vgdisplay -v /dev/vg00 |more --> verfiy the newly added disk

Proceed to "lvextend" or step to increase File System.

>>i think, one pair to VG00 with 2 disks and the other pair to mirror copy of VG00?<<

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtxdx /dev/dsk/cxtxdx --> newly added disk.
(repeat above for all you lvols in VG)

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: How to create a Physical Volumen Group.

option 2:-

You "safely "unmirror" you "Secondary" disk part of vg00, and add in new disk "Bigger size"

Follow below steps
===============

Generic Procedure for Creating Mirrors

This procedure assumes that c1t4d0 is the primary. Therefore, c1t5d0 will be the mirror set.

Note the hardware address for both the primary and secondary physical volumes- in this case 8/8.4.0, primary and 8/8.5.0, secondary.


1. Do a vgdisplay ├в v /dev/vg00 | grep dsk to verify that c1t4d0 is the primary disk..

2. Create the physical volume on the mirror disk.


pvcreate ├в B /dev/rdsk/c1t5d0

(NOTE: If you are using a previously used disk, you can run ├в pvcreate ├в fB /dev/rdsk/c1t5d0├в to force the pvcreate.)


3. Extend vg00 to include the mirror volume.


vgextend vg00 /dev/dsk/c1t5d0


4. Create a boot area on the mirror disk.


mkboot /dev/rdsk/c1t5d0


5. Turn off the disk quorum enforcement on both primary and mirror volumes.


mkboot ├в a "hpux ├в lq" /dev/rdsk/c1t5d0

mkboot ├в a "hpux ├в lq" /dev/rdsk/c1t4d0


6. Extend all of the vg00 volumes to include the mirrror.


lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c1t5d0

lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c1t5d0


7. Change the mirror consistency of the swap volume to "NONE"


This will require a reboot to single user mode├в ┬ж├в ┬ж

8.1 shutdown ├в r ├в y 0

Press any key to break the boot sequence at the select boot system area.

BOOT_ADMIN> boot pri

Interact with ipl (enter yes to select)

ISL> hpux ├в lm

1. From maintance mode.

vgchange ├в a y vg00 (active the volume group)

lvchange ├в M n ├в c n /dev/vg00/lvol2

8.4 Reboot the system shutdown ├в r ├в y 0

2. Verify the mirror volume.

vgdisplay ├в v /dev/vg00 | grep dsk (verify that both disks are part of vg00)

lvdisplay ├в v /dev/vg00/lvol1 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol2 | more (verify that a mirror exists for each volume)

(verify that MWC is NONE for volume2)

lvdisplay ├в v /dev/vg00/lvol3 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol4 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol5 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol6 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol7 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol8 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol9 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol10 | more (verify that a mirror exists for each volume)

lvdisplay ├в v /dev/vg00/lvol11 | more (verify that a mirror exists for each volume)

Check to verify that both disks have a BDRA area listed.

lvlnboot ├в -v

List files in the mirrors lif area

lifls /dev/rdsk/c1t5d0 - This should return the following:

ISL AUTO HPUX PAD LABEL

Verify that "hpux ├в lq" is in the AUTO file on both disks.

lifcp /dev/rdsk/c1t5d0:AUTO -

lifcp /dev/rdsk/c1t4d0:AUTO ├в

3. Reboot the system using the mirror disk.

shutdown ├в r ├в y 0

Break during the boot sequence.

BOOT_ADMIN> boot 8/8.5.0

The system should boot from the mirror.

Verify logical volumes.

4. Reboot again to switch back to the primary volume.

shutdown ├в r ├в y 0

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
FOBF
Frequent Advisor

Re: How to create a Physical Volumen Group.

He Johnson

Thanks for your answer, i goin to test the firts option becouse i will not able to reboot the server, let me try and when i finish i will tell you.

Thanks again.
Steven E. Protter
Exalted Contributor

Re: How to create a Physical Volumen Group.

Shalom,

Basics create new volume group:

http://docs.hp.com/en/B2355-90692/index.html

To mirror:
# after extending a volume group to include second disk.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ganesan R
Honored Contributor

Re: How to create a Physical Volumen Group.

Hi,

Answer depends on policy you have created for logical volumes.

By default all logical volumes will be created with strict allocation policy. That means the mirror copy of the lv should not reside on the same pv.

If you have created/changed the policy to not-strict allocation, then you can have both primary and mirror copy on the same disk. But what is the meaning of having that kind of setup. If that disk fails, we loose both primary and mirror data.

So you need to have seperate disks for both primary and mirror copies.
Best wishes,

Ganesh.
FOBF
Frequent Advisor

Re: How to create a Physical Volumen Group.

he,

I checked another issue about my problem and finally i found the way to make the configuration that i need.

PVG (Physical Volumes Group), i have to create /etc/lvmpvg flat file; something like that

VG /dev/vg00
PVG PVG0
/dev/dsk/c2d0s2
/dev/dsk/c2d1s2
PVG PVG1
/dev/dsk/c3d0s2
/dev/dsk/c3d1s2

where PVG0 will be the disks VG00 and PVG1 will be the disks mirror of VG00, nevertheless i am not very clear about how to procedure in order to create this configuration. I thinks step by step:

1.- Split the orignal mirror (vg00 - internal disk)
2.- remove the mirror disk from vg00
3.- add new disk from eva in order to increase the filesystem requiered
4.- create the new vg's, create the PVG file
5.- finally to create the mirror

I think, it's will be the procedure. Any advice.

Thanks