Operating System - HP-UX
1834665 Members
2557 Online
110069 Solutions
New Discussion

Script to mirror boot disks for hp-ux 11iv2 Integrity server

 
charlie_bulosan
Frequent Advisor

Script to mirror boot disks for hp-ux 11iv2 Integrity server


Hi All,

I would be very thankful if somebody could provide me a script to mirror the boot disks of a hp-ux 11iv2 Itanium server.

I have this script - to mirror both PARISC and Itanium. It works on PARISC but it is encountering an error on Itanium. This script was actually modified from HP's document post Ignite recovery mirroring of boot disks. Refer to the attached.


Many thanks,
Charlie
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Script to mirror boot disks for hp-ux 11iv2 Integrity server

Shalom Charlie,

This is not something you generally script.

Though you can.

Here is a procedure that you can modify slightly to work with 11.23 and then script if you wish.

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
charlie_bulosan
Frequent Advisor

Re: Script to mirror boot disks for hp-ux 11iv2 Integrity server


SEP,

Thank you for this but we already have the procedure.


Thanks,
Charlie
Torsten.
Acclaimed Contributor

Re: Script to mirror boot disks for hp-ux 11iv2 Integrity server

>> "it is encountering an error on Itanium"

What error you get?

I assume there is a problem here:

PARTS2=${PART2}s2
...
idisk -qwf /tmp/partitionfile /dev/rdsk/$PART2

The idisk command need the disk device file, NOT the partition device file!

Same for this:

mknod /dev/rdsk/${PART2}s1

this becaomes likely cxtydzs2s1 ???

Next wrong line is here:

mkboot -a "hpux -lq" /dev/rdsk/${PARTS2}

Needs to be

===============================
(from my script:)
autobootstring="boot vmunix -lq"
echo "write AUTO file to disk ..."

efi_cp -d /dev/rdsk/${mirrdisk}s1 /tmp/AUTOfile /EFI/HPUX/AUTO

===============================



Consider to write the script based on the procedure in Appendix:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

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!   
Deepak Kr
Respected Contributor

Re: Script to mirror boot disks for hp-ux 11iv2 Integrity server

Hi,

Boot disk mirroring is not that complex on Itanium only few changes.

Please refer to following PDF.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Appendix A. Page 26 to 28.

You can use this doc for more than mirroring task. Nicely written..
"There is always some scope for improvement"
charlie_bulosan
Frequent Advisor

Re: Script to mirror boot disks for hp-ux 11iv2 Integrity server

Hi All,

This is the script I'm talking about on the HP Document Ignite-UX and MirrorDisk/UX. You'll see the script from page 10 to 13.
http://docs.hp.com/en/5992-2900/5992-2900.pdf

Torsten, thanks for pointing the major error.

I know the script is more complicated than the once you've all mentioned ... but this has the feature to identify the right size of the EFI and HPSP sections on the primary boot disk.


Thanks,
Charlie