Operating System - HP-UX
1837509 Members
3762 Online
110117 Solutions
New Discussion

Re: add a mirror boot disk

 
SOLVED
Go to solution
cazxd
Advisor

add a mirror boot disk

There is only one boot disk on one of my production HP-UX box (11.11), and No hard Raind Controller.

There are 9 logical volumes for the vg00 (one HD 18G). they arr,
lvol1 300M
lvol2 1G (Swap & dump)
lvol3 200M (Boot)
lvol4 200M
lvol5 20M
lvol6 852M
lvol7 1.1G
lvol 1.5G
lvol9 12G


If the current disk is /dev/dsk/c1t1d0 18G
and the new disk is /dev/dsk/c1t1d1 18G

Can I add a mirror boot disk without screwing up the current HP-UX 11 by

1."pvcreat -f /dev/rdsk/c1t1d1" to create the new PV for the new disk.

2."vgextend /dev/vg00 /dev/dsk/c1t1d1"
to extend the vg00

3."lvextend -m l /dev/vg00/lvol1 /desk/dsk/c1t1d1" to extend lvol11 and mirror it. then mirror all the rest logical volume 2-9.

My question is,
1. if the above steps work.
2. shall I apply the "lvlnboot" and "lvchange" on the boot & swap volume lvol2.
3.after mirroring the boot disk, if either of the twoo mirrored disk fails, can I remove the failed one, boot the HP-UX box by the other HD and rebuilt the mirror.
4.Shall I unmount the mount point "/","/var","/stand","/etc" to extend/mirror the volumes.

Thank you



question
7 REPLIES 7
G. Vrijhoeven
Honored Contributor

Re: add a mirror boot disk

Hi,

You can use:
PS. Change c2ttd0 in c1t1d1

# Make a bootable Physical Volume

pvcreate -f -B /dev/rdsk/c2t6d0

# Extend vg00 with mirror disk

vgextend vg00 /dev/dsk/c2t6d0

# Install and update boot programw on disk

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

# Show the lifarea of new disk

lifls /dev/dsk/c2t6d0

# Extend the mirrorcopies of each Logical Volume

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0 # Extend the mirrorcopies of each Logical Volume

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol12 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol13 /dev/dsk/c2t6d0

# Prepare Logical Volume to be root, boot, swap or dump volume

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

Gideon
Jeff Schussele
Honored Contributor
Solution

Re: add a mirror boot disk

Hi,

Firstly you MUST pvcreate with -B to reserver the boot area - like

pvcreate -fB /dev/rdsk/c1t1d1

Then you need several steps between steps 2 & 3 - they are

A)mkboot -l /dev/rdsk/c1t1d1
B)mkboot -a "hpux -lq" /dev/rdsk/c1t1d1
C)mkboot -a "hpux -lq" /dev/rdsk/c1t1d0

Then I usually mirror the LVs in a for loop:

for i in 1 2 3 4 5 6 7 9 11
do
lvextend -m 1 /dev/vg00/lvol$i
done

Then check it with an lvlnboot -v
And finally you'll want to get the ODE (OffLine Diags) on the mirror as well - command would be like:

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

You can check whether teh ODE LIF files are present with

lifls -l /dev/rdsk/c1t1d1

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Marco Santerre
Honored Contributor

Re: add a mirror boot disk

First important to know is : Do you have the Mirror/UX software? If not, you'll need a codeword and install it from the Application CD.

You can add a mirror boot disk without messing with your current environment.

Steps are :
1) pvcreate -B /dev/rdsk/c1t1d1 (this will pvcreate your disk but will add the Boot area)
2) mkboot /dev/rdsk/c1t1d1
3) mkboot -a "hpux -lq" /dev/rdsk/c1t1d1 (this will boot without the quorum cause chances are if you're booting from that disk means the other one is dead)
4) vgextend vg00 /dev/dsk/c1t1d1
5) for i in 1 2 3 4 5 6 7 8 9
do
lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c1t1d1
done
6) lvlnboot -v (to verify that everything shows up fine.

Once your VG is mirrored, you will be able to boot from either disk, and if the first one fail, you'll be able to boot from the second one. So yes, you'll be able to shutdown replace the disk, bring it up using the second disks and re-sync back your mirror. More steps are involved in that, but you can search the Knowledge Base at ITRC for a document called LVM : Replacing mirrored disks.

And you don't need to unmount any filesystems in order to mirror.
Cooperation is doing with a smile what you have to do anyhow.
Steven E. Protter
Exalted Contributor

Re: add a mirror boot disk

My 2 cents.

Complete procedure as a reference.


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

Good Luck.

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
Jeff Schussele
Honored Contributor

Re: add a mirror boot disk

Oops - forgot the device in that mirror command:

lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c1t1d1

Later,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Helen French
Honored Contributor

Re: add a mirror boot disk

This is a very good document explains all steps needed to mirror your boot disk (TKB #LVMKBRC00005103):

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000071337682
Life is a promise, fulfill it!
Geoff Wild
Honored Contributor

Re: add a mirror boot disk

I just did this recently on 1 of my servers:

pvcreate -B /dev/rdsk/c5t8d0
vgextend /dev/vg00 /dev/dsk/c5t8d0
mkboot -a "hpux -lq" /dev/rdsk/c5t8d0
lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
lvextend -m 1 /dev/vg00/lvol4
lvextend -m 1 /dev/vg00/lvol5
lvextend -m 1 /dev/vg00/lvol6
lvextend -m 1 /dev/vg00/lvol7
lvextend -m 1 /dev/vg00/lvol8
lvextend -m 1 /dev/vg00/lvapp
lvextend -m 1 /dev/vg00/dbapp
lvextend -m 1 /dev/vg00/lvol9

Important thing is, do a:

lvlnboot -v /dev/vg00
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c5t8d0 (1/0/2/0/1.8.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c5t8d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c5t8d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c5t8d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

You need to see "Boot Disk" on both devs in order for each of them to be bootable.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.