Operating System - HP-UX
1836770 Members
2181 Online
110109 Solutions
New Discussion

mirror root diak commands

 
SOLVED
Go to solution
Jerry L. Sims
Frequent Advisor

mirror root diak commands

HP-UX B.11.11 9000/800/N4000-75

Hello All,

I was using the following script to build a mirror disk for root as follows :

#######################
#!/bin/sh
MIRRORDISK=c2t6d0
PRI_HWPATH="0/0/2/1.6.0"
ALT_HWPATH="0/0/2/0.6.0"
LVOLS=`vgdisplay -v /dev/vg00 | grep "LV Name" | awk '{print $3}'`

pvcreate -B -f /dev/rdsk/${MIRRORDISK}
mkboot -l /dev/rdsk/${MIRRORDISK}
mkboot -a "hpux -lq" /dev/rdsk/${MIRRORDISK}

vgextend /dev/vg00 /dev/dsk/${MIRRORDISK}

for LVOL in ${LVOLS}
do
lvextend -m 1 ${LVOL} /dev/dsk/${MIRRORDISK}
done

lvlnboot -R
lvlnboot -v

setboot -p ${PRI_HWPATH}
setboot -a ${ALT_HWPATH}
setboot
# end of script
#######################

It was reccomended to me to add the following :

lifcp /dev/rdsk/c2t6d0:AUTO -

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

lifls -l /dev/rdsk/c2t6d0

mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX \
-p PAD -p LABEL /dev/rdsk/c2t6d0

Questions :
1) What is the "lifcp /dev/rdsk/c2t6d0:AUTO -"
adding? I thought the "mkboot -a" was adding
what was needed?

2) Is the :
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
adding anything? I though the "lvlnboot -R"
handled all of this?

3) Doesn't the "lifls -l" just list the lif
information?

4) Would you add the :
"mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX \
-p PAD -p LABEL /dev/rdsk/c2t6d0"
?

3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: mirror root diak commands

Hi,

1. lifcp line doens't do anything other than displaying the AUT0 file on the disk. But it doesn't hurt as it provides confirmation.

2. lvlnboot -R should be enough. But I will run all the commands if I am running "mkboot" commands on both the disks.

3. Yes. Not necessary. But good for verification purposes.

4. Yes, but I do not include PAD in there. AUTO is important otherwise, you will need to run mkboot with -a option again.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ashwani Kashyap
Honored Contributor

Re: mirror root diak commands

1. lifcp is not adding anything , its just displaying the content of the AUTO file on your screen . Its good for verification . It should always come back with hpux .

2. lvlnboot -R will do it but I always prefer doing the individual root,boot,swap and dump volumes . Old habits die hard , I guess .

3. Yes true .

4. Yes I would do it because by mirroring the root volume , you are not mirroring the online/offiline diagnostics in the lif area . theis mkboot command does it .
YOu can verify it by running lifls on the mirrored disk before and after this procedure . YOu will see difference in the lif contents .
Joy Orton
Occasional Advisor

Re: mirror root diak commands

1) This is the Boot string (ie "hpux -lq")not the boot program.
2) There was a period of time with 10.20 and if I remember right 11.0 that running lvlnboot -R would break the partition. It was not fixed by patches for some time. Oldtimers tend to stick to the basics so we don't have to worry if the box is patched for this or not.
3) Yes it is a long listing. I do this also... I like to know it is OK.
I Also add lvlnboot -v and setboot -v.
It's good to check your work.
4) It will freshen the diags. I always run it. Don't forget to update /stand bootconf for both disks. this allows when diags are updated via swinstall the disks are outmagically updated.