Operating System - HP-UX
1855409 Members
3635 Online
104110 Solutions
New Discussion

Re: help and tips required on mirroring

 
SOLVED
Go to solution
Jerome D'silva
Advisor

help and tips required on mirroring

Hi,
We have two HP L class servers with two native disks on each of them. We would be connecting the SAN boxes them shortly which would run DBMS.I am not very much comfortable with HPUX (since I donot use HPUX often) .
I wanted some tips and procedures on the mirroring methods and the one which may best suite my need .
-----------------------
My question would be
-----------------------
Would mirroring the first disk ( containing only the Operating system,swap ...) onto the second disk the best way for fault tolerance?. Should I use whole disk or LVM ? .
Also , please let me know what packages need to be installed to get this functionlaity and the procedures/commands for mirroring /how do I boot from the second disk in case the first disk fails ? or which is the best way to achive fault tolerant considering my hardware resources ?

Thanks
Jerome
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: help and tips required on mirroring

Hi Jerome:

Mirroring the boot disk is highly recommended. You will need to license (if you haven't already) MirrorDisk/UX.

Mirroring in HP-UX is done at the logical volume level. To mirror the boot disk, do the following where 'cXtYdZ' is a scratch disk to which you will mirror:

# pvcreate ???B /dev/rdsk/cXtYdZ
# vgextend /dev/vg00 /dev/dsk/cXtYdZ
# mkboot /dev/rdsk/cXtYdZ
# mkboot ???a ???hpux ???lq??? /dev/rdsk/cXtYdZ
# for LV in 1 2 3 4 5 6 7 8
> do
> lvextend ???m 1 /dev/vg00/lvol${LV} /dev/dsk/cXtYdZ
> done
# lvlnboot ???v

# mkboot ???a "hpux ???lq" /dev/rdsk/cXtYdZ #...for the original volume, too!
# setboot ???a [alternate_path] #...for new mirror...
# lifcp /dev/rdsk/xCtYdZ:AUTO - #...copy to stdout for verification...

Note that the logical volumes are mirrored in the same order as originally established. The 'mkboot -a "hpux -lq' sets a low-quorum so that if one of your boot disks isn't present, volume group activation will still occur. The 'setboot -a [alternate_path] sets your mirror to be a secondary boot device in the event that the primary should ever fail.

Regards!

...JRF...
Jerome Baron
Respected Contributor

Re: help and tips required on mirroring

Hi,

To mirror you can use mirror UX.
Command to mirror lvm volume is
# lvextend -m 1 /dev/dsk/cxtydz
To make volume bootable use lvlnboot (1M)
Reghards,
Jerome


S.K. Chan
Honored Contributor

Re: help and tips required on mirroring

Mirroring your root disk will minimized the damage and the need for total root volume recovery. From your information both your "intended" root disks are just regular disks, so LVM is definately the way to go here, it gives you more flexibility to manage your filesystem vs whole disk configuration. You would need to purchase ..
1) MirrorUX
2) OnlineJFS
The MirrorUX is an add on to your LVM functionality, it allows you to mirror your LVM disks. OnlineJFS is a nice tool that allows you to increase/decrease your filesystem on-the-fly, hence reducing your downtime. The following is an example of the mirroring process. It includes the step on how to set your boot path to the mirrored disk in order to test it.

o Assuming c1t2d0 is primary disk and c2t2d0 is the disk to be mirrored.
o Assuming (lvol1=/stand;lvol2=primary swap;lvol3=/;lvol4->lvol8=the rest)

# swlist -l bundle| grep -i mirror
=> Make sure you have MirrorUX installed
# pvcreate -f -B /dev/rdsk/c2t2d0
# mkboot -l /dev/rdsk/c2t2d0
=> Create boot track (place boot utilities in boot area), -l means treat device as LVM disk.
# mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
=> Add AUTO file in boot LIF area, "lq" option is to bypass quorum check.
=> Repeat for primary disk (c1t2d0) as well.
# lifcp /dev/rdsk/c2t2d0:AUTO -
=> Check content of AUTO file. Repeat for primary disk (c1t2d0).
# vgextend /dev/vg00 /dev/dsk/c2t2d0
=> Adding disk to root VG.
# pvdisplay -v /dev/dsk/c2t2d0
=> Note of the order of LVs (assuming it's lvol1,lvol2,lvol3,lvol4->lvol8)
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
=> Repeat for lvol2->lvol8
# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
=> Update BDRA (root, boot, swap and dump)
# lvlnboot -v
=> Check to make sure both disks are listed for root, boot and swap definition.
# setboot
=> Display boot path.
# setboot -a 0/0/2/0.2.0
=> Change alternate boot path to mirrored disk.
# shutdown -r -y 0
=> Interrupt upon bootup and select alt path to boot from in order to test.

For the official doc take a look at the SOftware Recovery Handbook (chap 16)
http://us-support3.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/Introduction.pdf
Christopher McCray_1
Honored Contributor

Re: help and tips required on mirroring

Hello,

You need the optional Mirrordisk/UX software to accomplish this.

This link and many others (by doing a search on mirroring in the ITRC Forums)should have all the information you need to mirror you vg00, once you have Mirrordisk:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xef737bb04b5cd611abdb0090277a778c,00.html

Use LVM for your disk layout.

Hope this helps

Chris
It wasn't me!!!!