1833758 Members
3078 Online
110063 Solutions
New Discussion

Mirroring on HP-UX

 
Thomas Lloyd
Occasional Advisor

Mirroring on HP-UX

We are now looking at mirroroing on hp-ux we have been asking if you would mirror the swap area. Can people tell me if you would or wouldn't and the reasons why.

Cheers

Tom
14 REPLIES 14
Vijaya Kumar_3
Respected Contributor

Re: Mirroring on HP-UX

It is a good idea to mirror Swap. The system may hang if swap space is inaccessible...


Mirroring swap is same like mirroring any other logical volumes...

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

I would recommend to mirror your vg00 (including /, /usr, /var etc) (without any user data)...

-Vijay
Known is a drop, unknown is ocean - visit me at http://vijay.theunixplace.com
Hoefnix
Honored Contributor

Re: Mirroring on HP-UX

If you mirror all the lvol's of the bootdisk you also should mirror the swap-lvol.
When the default bootdisk crash you are still able to run on the other disk because the swapspace is also mirrored on the second disk.

When the second disk need to be bootable you should do also other things.
when the second disk is c1t6d0 then run the next command's
pvcreate -f -B /dev/rdsk/c1t6d0
vgextend /dev/vg00 /dev/dsk/c1t6d0

mkboot /dev/dsk/c1t6d0
mkboot -a 'hpux -lq' /dev/dsk/c1t6d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p HPUX -p LABEL -p AUTO /dev/dsk/c1t6d0

lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
.... For all the lvol's in vg00 (also swap)

For the default lvol's do next
$ lvlnboot -r /dev/vg00/lvol3
$ lvlnboot -b /dev/vg00/lvol1
$ lvlnboot -s /dev/vg00/lvol2
$ lvlnboot -d /dev/vg00/lvol2

$ lvlnboot -R /dev/vg00
$ lvlnboot -v

Be aware you should have MirrorUX installed on your system.

Regards,

Peter



Ravi_8
Honored Contributor

Re: Mirroring on HP-UX

Hi Tom

I wouldn't mirror swap, since process such as paging, scheduling wouldn't use mirrored swap. which is really a wastage of disk space
never give up
Sunil Sharma_1
Honored Contributor

Re: Mirroring on HP-UX

Hi,

I will always prefer mirroring of swap becoz if i am not mirroring swap and one disk get failed system willn ot come up normally becoz swap space is not available.

It's always good to mirror swap too.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Sanjay Kumar Suri
Honored Contributor

Re: Mirroring on HP-UX

If there is enough mirror space available, having 1+1 is a good idea?

However if there is a constraint, then what are ignite backups for in case of loss of disk having swap space.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Joseph Loo
Honored Contributor

Re: Mirroring on HP-UX

hi,

sorry, just being practical and following what is documented to perform mirroring without a hitch, so:

refer to Technical Knowledge Base, Doc ID: LVMKBRC00005103, "How to create a Mirrored Boot Disk on PA-RISC Systems - Cookbook"

regards.
what you do not see does not mean you should not believe
T. M. Louah
Esteemed Contributor

Re: Mirroring on HP-UX

To mirror root disk, you have to create an identical image of it on an alternate disk, following the same "chronological" order of primary lvols. That means lvol1 (/stand) need to be in the very begining of the disk followed directly with lvol2 which is the primary swap, then lvol3 (/) .. these lvols are strict & contigous (no gaps between PEs). also if primary disk fails your system will need primary swap which has to be layed out on alternate disk.

Cheers,
Little learning is dangerous!
G. Vrijhoeven
Honored Contributor

Re: Mirroring on HP-UX

Hi Tom,

I am confused by Ravi's remark.

I always mirror the primary swap space. We mirror all the lvols that belong to vg00 including swap space. If paging does not use the mirrord disk how come that if the primairy root disk fails the system does not panic ( since we loos primairy swap asswell) i think paging does use both disks. Can you explain this ?
So my advise is to mirror swap ( vg00 at least)


Gideon
A. Clay Stephenson
Acclaimed Contributor

Re: Mirroring on HP-UX

Any swap area should be mirrored. If any swap area is not available -- even if not in actual use --- the system can and almost certainly will crash. If all swap LVOL's are mirrored then you can replace disks "on the fly" (assuming your disks are hot-plug) and never need to shutdown.

Dump areas, on the other hand, should never be mirrored. There should be no question as to where a dump image is actually written. Many people assume that dump and swap are the same areas; that is the default. Swap and dump should never be combined because their functions are entirely separate and moreover if separated, you don't have to worry about copying the dump images before going multi-user.
If it ain't broke, I can fix that.
Marco Santerre
Honored Contributor

Re: Mirroring on HP-UX

I have alwasy mirrored my primary swap and any other swap located on vg00. Usually, there is always a second disk of equal size to the first one, and I always make sure that the second disk is only used for mirror purposes.

I have seen cases where people have put swap areas on other VGs, and those I do not mirror.
Cooperation is doing with a smile what you have to do anyhow.
Jakes Louw
Trusted Contributor

Re: Mirroring on HP-UX

I definitely mirror primary swap, and then put all my secondary swap on RAID if I can.

A server will panic if you get problems with un-mirrored swap, and if you have problems with a critical disk like this (especially your root/boot disk), then the server will probably hang due to excessive diagnostics/error-recovery anyway.

Rather safe than sorry.
Trying is the first step to failure - Homer Simpson
Wim Rombauts
Honored Contributor

Re: Mirroring on HP-UX

If you want to protect your system from disk crashes, it is important to have ALL your swap devices mirrored or on a high-available disk system.

If there is 1 swap device unmirrored, or becomes unavailable because there is a disk failure and no RAID available that keeps the swap device available, your system will defenitely panic.

If you mirror your root disk, make it bootable (see mkboot and pvcreate -B), and configure this second disk as the alternate boot path in BOOT-ADMIN mode.

Also be sure that the logical volumes (stand, root, swap) on both bootable disks are in exactly the same order : Dont set stand-swap-root on disk 1 and stand-root-swap on disk 2.

Other important things have already been said by others.

Starting mirroring on a non-mirrored LVM rootdisk is not that difficult to configure.

success.
D.Blond
Frequent Advisor

Re: Mirroring on HP-UX

Hi TOm,
To mirror your root disk :
USAGE : PROG disque (for example c2t2d0)

pvcreate -Bf /dev/rdsk/$1
mkboot -l /dev/rdsk/$1
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/$1
vgextend /dev/vg00 /dev/dsk/$1
vgdisplay -v /dev/vg00 |grep "LV Name" |awk '{ print $3 }' | while read vl
do
lvextend -m 1 $vl
done
mkboot -b /usr/sbin/diag/lif/updatediaglif -p AUTO -p ISL -p HPUX -p LABEL -p PAD /dev/rdsk/$DISK
vgdisplay -v vg00
lvlnboot -v

regards

D.Blond
Saurav_1
Valued Contributor

Re: Mirroring on HP-UX

Hi,

I agree with Sunil. System will not come up from the mirrored disk. In case of failure of original HDD. Root mirroring is done in case of original fails. The system doesn't reboot and continues with the mirrored copy. That is why SWAP mirroring is must.
Change the (empty) physical volume to become a stand-by spare for the volume group:

pvchange -z y /dev/dsk/c2t0d2.

Check man page of "pvchange"

Pls do assign points accordingly.

Saurav