Operating System - HP-UX
1753785 Members
7658 Online
108799 Solutions
New Discussion юеВ

Re: Creating boot disk mirror

 
David Owens_1
Advisor

Creating boot disk mirror

I have a rp5405 server with (2) 36 GB disks. One disk contains the root file system with a single volume group (vg00). There is also a logical volume under vg00 that I am using for small Oracle database. The other disk is not being used so I would like to mirror all of disk 1 to disk 2.

Could someone please take a look at this and let me know if I am on the right track?

Disk 1
/dev/dsk/c1t2d0

Disk 2
/dev/dsk/c2t2d0

Logical volumes on vg00
lvol1 /stand
lvol2 SWAP
lvol3 /
lvol4 /tmp
lvol5 /usr
lvol6 /home
lvol7 /opt
lvol8 /var
lvol9 /data # used for Oracle

----------------------------------------
Create a recovery tape first
# make_tape_recovery -A

Create physical volume with boot area
# pvcreate ├в B ├в f /dev/rdsk/c2t2d0

Add physical volume to root volume group
# vgextend /dev/vg00 /dev/dsk/c2t2d0

Place boot utilities in the boot area and add the AUTO file
# mkboot /dev/rdsk/c2t2d0
# mkboot ├в a ├в hpux ├в lq├в /dev/rdsk/c2t2d0

Update the AUTO file on the primary boot disk (not sure about this)
# mkboot ├в a ├в hpux ├в lq├в /dev/rdsk/c1t2d0

Mirror the logical volumes
# lvextend ├в m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0
# lvextend ├в m 1 /dev/vg00/lvol9 /dev/dsk/c2t2d0

Update the BDRA and the LABEL file
# lvlnboot ├в R /dev/vg00

---------------------------------
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Creating boot disk mirror

A more complete guide.


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
Chris Wilshaw
Honored Contributor

Re: Creating boot disk mirror

Looks fine to me (I'm guessing that some cut/paste feature has screwed up your hyphens.)

The only other thing I can think of that you'll need to do is set the alternate boot path

Get the hardware path of your disk from ioscan eg: 2/4.1.0

then

setboot -a 2/4.1.0
Lorenzo Facello
Valued Contributor

Re: Creating boot disk mirror

pvcreate -B (bootable)-f (force) /dev/rdsk/cxtxdx

mkboot /dev/rdsk/cxtxdx
mkboot -a hpux -lq (;0)/stand/vmunix/dev/dsk/c1t0d0

vgextend /dev/vg00 /dev/dsk/cxtxdx
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtxdx
all 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 vg00

---------
setboot
setboot -a path second disk

L.
Lorenzo Facello
Valued Contributor

Re: Creating boot disk mirror

I think Steve gives for first a complete guide...while we were writing!
Regards
Kyri Pilavakis
Frequent Advisor

Re: Creating boot disk mirror

Have a look at my attached document...I have done it and it worked...

kyris
Bosses don't undestand..HP does