HP-UX how to mirror boot disk PA-RISC

MAKING A MIRRORED DISK OF THE  BOOT DISK:

1.     Make sure that mirror-ux is installed on your system.
2.     Find the correct disk you want to mirror and give that address instead of   c0t4d0
3.     The new disk should be having more/equal size than your existing root disk if you want a full mirror of root disk.

MAKING A MIRRORED DISK OF THE  BOOT DISK:


1 – check with diskinfo, pvdisplay to ensure you have the right disk

            ioscan –fnC disk
            diskinfo /dev/rdsk/c0t4d0
            pvdisplay –v /dev/dsk/c0t4d0 = will fail as disk is totally empty confirming its
                                                                 the right disk to mirror                        

2 – pvcreate –B /dev/rdsk/c0t4d0   - creates bootable physical volume

3 – vgextend  /dev/vg00  /dev/dsk/c0t4d0  - adds disk to existing volume group i.e  vg00

4 – mkboot  /dev/rdsk/c0t4d0  -  places boot utilities in boot area of the disk

5 – mkboot  -a  “hpux –lq (;0)/stand/vmunix” /dev/rdsk/c0t4d0  - points disk to /stand dir
or in case of a vpar
     mkboot  -a  “hpux –lq  /stand/vpmon” /dev/rdsk/c0t4d0 
                        -lq  - needed if only 2 disks exist in the mirroring; otherwise when booting
                                 it wont boot (if one disk is bad)and need to do  ISL >  hpux -lq
           
            do  -    vgdisplay –v   /dev/vg00           = will confirm disk is part of volume group
-       pvdisplay –v /dev/dsk/c0t4d0 

             [  steps 4 and 5 if it’s a boot disk and not just a data disk ]

6 – To install Offline Diagnostics Environment ODE


# 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?


Check for the AUTO file contents on the disk
lifcp /dev/rdsk/c?t?d?:AUTO -

7 – CREATE the logical volume that exist in the current disk on the new disk in the SAME SEQUENCE – as they appear in the     pvdisplay –v /dev/dsk/c0t6d0

root@hpms3: for i in 1 2 3 4 5 6 7 8            
> do                                                
> lvextend -m 1 /dev/vg00/lvol${i} /dev/dsk/c3t0d0 
> done                                             

or alternatively do it one at a time

            lvextend   -m  1  /dev/vg00/lvol1  /dev/dsk/c0t4d0
            lvextend   -m  1  /dev/vg00/lvol2  /dev/dsk/c0t4d0
            lvextend   -m  1  /dev/vg00/lvol3  /dev/dsk/c0t4d0
            lvextend   -m  1  /dev/vg00/lvol4  /dev/dsk/c0t4d0
            lvextend   -m  1  /dev/vg00/lvol5  /dev/dsk/c0t4d0     —-à      etc….

Please do the following command to have the boot/root/swap and dump areas in proper shape for the mirror

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


8 – Check with   lvlnboot  -v  to see both disks

hpedw01:/>lvlnboot -v /dev/vg00

Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c0t6d0 (10/0.6.0) — Boot Disk
        /dev/dsk/c0t4d0 (10/0.4.0) — Boot Disk

Boot: lvol1     on:     /dev/dsk/c0t6d0

                        /dev/dsk/c0t4d0
Root: lvol3     on:     /dev/dsk/c0t6d0
                        /dev/dsk/c0t4d0
Swap: lvol2     on:     /dev/dsk/c0t6d0
                        /dev/dsk/c0t4d0
Dump: lvol2     on:     /dev/dsk/c0t6d0, 0


9 – Check with    lvdisplay  -v  /dev/vg00/lvol[ 1 ]   which should show both disks
 available and should both be  ‘current’  NOT  ‘stale’.

hpedw01:/>lvdisplay -v /dev/vg00/lvol1 | pg
— Logical volumes —
LV Name                     /dev/vg00/lvol1
VG Name                     /dev/vg00
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               1
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            100
Current LE                  25
Allocated PE                50
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   off
Allocation                  strict/contiguous
IO Timeout (Seconds)        default

   — Distribution of logical volume —
   PV Name            LE on PV  PE on PV
   /dev/dsk/c0t6d0    25        25
   /dev/dsk/c0t4d0    25        25

   — Logical extents —
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 /dev/dsk/c0t6d0    00000 current  /dev/dsk/c0t4d0    00000 current
   00001 /dev/dsk/c0t6d0    00001 current  /dev/dsk/c0t4d0    00001 current
   00002 /dev/dsk/c0t6d0    00002 current  /dev/dsk/c0t4d0    00002 current
   00003 /dev/dsk/c0t6d0    00003 current  /dev/dsk/c0t4d0    00003 current
   00004 /dev/dsk/c0t6d0    00004 current  /dev/dsk/c0t4d0    00004 current
   00005 /dev/dsk/c0t6d0    00005 current  /dev/dsk/c0t4d0    00005 current
   00006 /dev/dsk/c0t6d0    00006 current  /dev/dsk/c0t4d0    00006 current
   00007 /dev/dsk/c0t6d0    00007 current  /dev/dsk/c0t4d0    00007 current
   00008 /dev/dsk/c0t6d0    00008 current  /dev/dsk/c0t4d0    00008 current

10 – Set the new disk to be secondary boot device  either in IPL  or at command level :

            setboot   = displays

hpedw01:/>setboot
Primary bootpath : 10/0.6.0
Alternate bootpath : 10/0.4.0

Autoboot is ON (enabled)
Autosearch is OFF (disabled)
           
            setboot   -a  10/0.4.0      [  before was the tape drive   10/12/5.0.0  ]


FINALLY —–

Shutdown –r –y 0  -à  Interacted with ISL à   BO ALT  =  This will check that u do    indeed have a 2nd bootable disk.

SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment