1832489 Members
4496 Online
110043 Solutions
New Discussion

mirroring a root disk

 
SOLVED
Go to solution
Indrajit Bhagat
Regular Advisor

mirroring a root disk

What is the procedure to mirror the root disk?
11 REPLIES 11
Steven E. Protter
Exalted Contributor
Solution

Re: mirroring a root disk

Shalom Indrajit,

Procedure below works for 11.00 and 11.11. LVM only. Minor modification required for IA64 systems.

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
Victor Fridyev
Honored Contributor

Re: mirroring a root disk

Hi,

You can use the attched script

HTH
Entities are not to be multiplied beyond necessity - RTFM
Pete Randall
Outstanding Contributor

Re: mirroring a root disk

See my response in your other thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1092863

Note concerning lvlnboot commands as listed by some others. I left out any
lvlnboot commands because they are not
necessary - see the man page:

"This command should be run in recovery mode (-R) whenever the configuration of the root volume group is affected by one of the following commands: lvextend, lvmerge, lvreduce, lvsplit, pvmove, lvremove, vgextend or vgreduce (see lvextend(1M), lvmerge(1M), lvreduce(1M), lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(1M), and vgreduce(1M)). Starting with HP-UX Release 10.0, this is done automatically."


Pete

Pete
Plank Guenther
Occasional Advisor

Re: mirroring a root disk

Another question...

I have heard from HP that it might result in a non bootable mirror when you execute the commands (vgextend and mkboot) in wrong order. vgextend probably overwrites the boot record.

So the example in this threat and the example in Pete's threat (mentioned above) are different.

Does this problem really exist - and what is the correct version?

Regards

Guenther
Isnoquote
Pete Randall
Outstanding Contributor

Re: mirroring a root disk

Guenther,

I can vouch for the procedure as I gave it - I've used it more than once and it works. By the same token, I'm convinced that Steve has used his procedure as well, so I would doubt that the order is critical.

The only issue I have with Steve's procedure is the extra "lvlnboot" steps.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: mirroring a root disk

Shalom,

Confirming Pete's statements. I've done it hundreds of times and its been followed many more times as posted with success on the forums.

Most of the steps can be done out of order and I in fact have done so, though now we use a script to mirror LVM.

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
spex
Honored Contributor

Re: mirroring a root disk

Guenther,

The procedure I use, which appears in HP-UX 11i System Administration Handbook and Toolkit Second Ed. by Marty Poniatowski, has 'vgextend' before the 'mkboot' commands. However, I have the feeling that the ordering of these two commands is not significant, as 'vgextend' does not write to a disk's boot area.

PCS
Doug O'Leary
Honored Contributor

Re: mirroring a root disk

Hey;

I always use my checklist for mirroring systems:

http://www.olearycomputers.com/ll/hp_mirrorux.html

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Plank Guenther
Occasional Advisor

Re: mirroring a root disk

Hello again,

In several years of admistrating I learned that always little things make the big points.

So if I don't do a
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0
on the primary disk every thing looks fine - but if the mirror-disk false, the system won't boot automatically - right?

Thanks

Guenther
Isnoquote
A. Clay Stephenson
Acclaimed Contributor

Re: mirroring a root disk

So if I don't do a
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0
on the primary disk every thing looks fine - but if the mirror-disk false, the system won't boot automatically - right?

That is correct; you should do the "hpux -lq ..." on both the primary boot disk and the alternate because unless you do so, a mirrored system is actually less likely to boot unassisted that an unmirrored system.

There is a possible downside to this approach, however. It is possible to be such sloppy admin that the failure of the primary disk might go unnoticed until the alternate boot disk fails as well.
If it ain't broke, I can fix that.
Torsten.
Acclaimed Contributor

Re: mirroring a root disk

It is not written in every procedure mentioned here, but very important to perform these steps:

# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2

Otherwise you may get serious problems to boot the system from the mirror.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!