1830829 Members
2673 Online
110017 Solutions
New Discussion

Mirror vg01 ?

 
SOLVED
Go to solution
someone_4
Honored Contributor

Mirror vg01 ?

Hello

I was wondering if there would be any benfit of using mirror-ux to mirror vg01?

If I have vg01 on diska and mirror vg01 on diskb. Does Mirror-ux know to use diskb on a live system if diska goes bad? Or would I need a hardware raid for this?

If mirror-ux can do it would I mirror vg01 the same as vg00 ? Or are there different procedures?

thanks
Richard
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Mirror vg01 ?

The question is as simple (and as complex) as "How valuable is your uptime". Generally, it's MORE important to mirror or RAID the non-vg00 disks than the vg00 disks. You can always get vg00 back -- albeit painfully from original sources but the data VG's are unique to your system therefore they should be mirrored (to reduce to near-zero downtime due to disk failures) and rigorously backed up.

The procedure to mirror non-boot disks is a little simpler than for vg00.

#!/usr/bin/sh
RAW=/dev/rdsk/c1t6d0 # your new vg01 mirror
COOKED=/dev/dsk/c1t6d0 # ditto
VG=/dev/vg01
LVOLS="lvol1 lvol2 lvol3" # season to taste

pvcreate -f ${RAW} # no -B
vgextend ${VG} ${COOKED}
for LVOL in ${LVOLS}
do
echo "Mirroring ${LVOL}"
echo
echo vgextend -m 1 ${VG} ${COOKED}
STAT=${?}
done
exit ${STAT}

That should do it but check for any typo's.

If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Mirror vg01 ?

Hi Richard:

Mirroring is one form of high-availability. Yes, MirrorDisk/UX will use "diskB" if "diskA" fails. Moreover, the data in the logical volume is safe from loss. You replace the failed disk and use the good copy to remirror ('vgsync' or lvsync').

The procedure for mirroring a non-vg0 is the same as for vg00 with the exception that you don't 'pvcreate' a physical volume with the '-B' option since you are not using it as a boot volume.

Remember, LVM mirroring is implemented at the *logical volume* level, despite the fact that we call the product "MirrorDisk". Hence, you add mirror copies to a logical volume using the 'lvextend -m' syntax. Have a look at eh 'lvextend' man pages (*and* 'lvcreate' and 'lvreduce' too!).

The only time mirroring fails miserably is when you write or remove the wrong file -- the operation occurs on all mirrors for good measure :-))

Regards!

..JRF...
Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Mirror vg01 ?

Oops,

the echo vgextend -m 1 ...
SHOULD OBVIOUSLY BE
vgextend -m 1 ... ### no echo
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Mirror vg01 ?

Hi Richard:

My good friend, Clay, meant to have written 'lvextend -m 1' *instead* of 'vgextend -m 1'.

Afterall, its Friday!

p.s. I should add, of course, to my own comments about mirroring non-vg00 disks, that neither 'pvcreate -B' nor 'mkboot' commands are used.

Regards!

...JRF...
GK_5
Regular Advisor

Re: Mirror vg01 ?

vg01 will be available even if diska goes bad if you mirror it with diskb using mirror-ux. You can replace diska and mirror it again.

The procedure is same. The only thing is on vg00 you need to initialize the disk with "pvcreate -B" and you need not do mkboot on the disk for vg01.
IT is great!
someone_4
Honored Contributor

Re: Mirror vg01 ?

Hey guys ..

I actully caught the lvextend typo after I ran it once and failed.

The syntax was also off a little Mr. Clay forgot to speficy the lvol that is getting mirrored so I had to change:

lvextend -m 1 ${VG} ${COOKED}

To

lvextend -m 1 ${VG}/${LVOL} ${COOKED}

its friday so it is all good. :)

Thanks Everyone

Richard
Jeff Schussele
Honored Contributor

Re: Mirror vg01 ?

Hi Richard,

The question I have is I wonder if it's a hot Friday in Atlanta? ;~))
Thank God there's been no power outage down there....but maybe our esteemed colleagues are just daydreaming about missing it....NAH....they just had a case of cut&pasteitis I think.

Cheers,
Jeff (Hell - it's hot here - 94 today...Someone PLEASE send rain)
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
someone_4
Honored Contributor

Re: Mirror vg01 ?

Hi Jeff,

Well I dont know about you but I never really thought about Mr.Clay Or Mr.James using copy paste. I have always thought that they wrote the small to medium scripts from the top of their head. And to tell you the truth I would not want to know otherwise. The salad head legend continues. :)

Richard