Operating System - HP-UX
1838330 Members
3417 Online
110125 Solutions
New Discussion

Mirroring to a Volume Group Question 1

 
SOLVED
Go to solution
Scott Frye_1
Super Advisor

Mirroring to a Volume Group Question 1

I have create two volume groups on our SAN. Each VG has one primary and three alternate disks assigned. I want to mirror all my lvols from vg01 to vg02. When I go into SAM and try to do this, it tells me I need 2 PVG's. I never new about PVG's before so I manned vgcreate. I removed my VG01 and recreated it. This time making sure to include the -g paramter so I had "1" PVG.

My first question is how do I generate the second PVG and do I need a PVG for VG02.

Thank you

Scott
8 REPLIES 8
Slawomir Gora
Honored Contributor

Re: Mirroring to a Volume Group Question 1

Hi,

you can't mirror disks between vg groups.
You have to have two (or more) PV (disks) in one vg group to perform mirror of lvols.
Pete Randall
Outstanding Contributor

Re: Mirroring to a Volume Group Question 1

Scott,

What you're going to need to do is get rid of the second VG and combine it with the first so you can mirror.


Pete

Pete
Scott Frye_1
Super Advisor

Re: Mirroring to a Volume Group Question 1

Can you explain Pete? Are you saying I do a vgcreate -g name1 vg01 /dev/dsk/cxtxdx /dev/dsk/cxtxdx /dev/dsk/cxtxdx /dev/dsk/cxtxdx
and
vgcreate -g name2 vg01 /dev/dsk/cxtxdx /dev/dsk/cxtxdx /dev/dsk/cxtxdx /dev/dsk/cxtxdx

using the disks I did have assigned to vg02 for pvg name2?
Geoff Wild
Honored Contributor

Re: Mirroring to a Volume Group Question 1

Scott, you have vgcreated vg01.

Remove vg02 (vgexport)

Then vgextend vg01 with the disks in vg02.

Question though - why would you want to mirror at the LVM level? Don't you already have mirroring or some othe RAID in your SAN?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Heiner E. Lennackers
Respected Contributor

Re: Mirroring to a Volume Group Question 1

You only need one VG with all your disks you want to use. In this VG you create a logical volume. Now you can mirror this lvol. The lvol and the mirror are part of the same VG, but on different PV (disks).
if this makes any sense to you, you have a BIG problem
Pete Randall
Outstanding Contributor
Solution

Re: Mirroring to a Volume Group Question 1

Scott,

As I mentioned in your other thread, MirrorDisk works at the logical volume level and the LVs have to be within the same VG. Do a man on lvextend and check out the -m option - that's how the mirrors are created and they obviously have to be in the same VG.


Pete

Pete
Scott Frye_1
Super Advisor

Re: Mirroring to a Volume Group Question 1

To answer the question of why... we are wanting to do this for redundancy without using third party software. EMC would love to sell us snapview or mirrorview, but we want something better. We want simultaneous writes to two seperate SAN's. That way if one SAN blows up, we have an exact duplicate copy of everything. One test we want to do is to determine how "seemless" this is. What delay is there to access a mirrored disk (non boot)in the event our SAN does go down.
Sundar_7
Honored Contributor

Re: Mirroring to a Volume Group Question 1

Scott,

Your first question has already been answered. You cannot mirror a LV in a VG to a physical volume that is on the other volume group.

You need to destroy VG02 and add the PV to VG01, then mirror the LV to the PV.

""
One test we want to do is to determine how "seemless" this is. What delay is there to access a mirrored disk (non boot)in the event our SAN does go down. ""

LVM will conclude that a PV has failed if the IO to the PV did nt complete in 30 secs (PV timeout default).

Sundar.
Learn What to do ,How to do and more importantly When to do ?