Step 1: Make ensure you have the right disk
# ioscan –fnC disk
# diskinfo /dev/rdsk/c0t4d0
The command below should fail if the disk is completely empty
confirming its the right disk to use as a mirror!
# pvdisplay –v /dev/dsk/c0t4d0
Step 2: Create bootable physical volume
# pvcreate –B /dev/rdsk/c0t4d0
Step 3: Add disk to existing volume group i.e vg03
# vgextend /dev/vg03 /dev/dsk/c0t4d0
NOTE: Perform Steps 4 and 5 if it’s a boot disk
and not just a data disk.
Step 4: Place boot utilities in boot area of the disk
# mkboot /dev/rdsk/c0t4d0
Step 5: Point disk to /stand dir
# mkboot -a “hpux –lq (;0)/stand/vmunix” /dev/rdsk/c0t4d0
NOTE: Switch "-lq" is needed only if 2 disks exist in the mirror.
Otherwise, when booting it will not boot if one of the disks is bad.
Perform: ISL > hpux -lq
Confirm disk is part of volume group:
# vgdisplay –v /dev/vg03
# pvdisplay –v /dev/dsk/c0t4d0
Stp 6: 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
lvextend -m 1 /dev/vg03/lvol1 /dev/dsk/c0t4d0
lvextend -m 1 /dev/vg03/lvol2 /dev/dsk/c0t4d0
lvextend -m 1 /dev/vg03/lvol4 /dev/dsk/c0t4d0
lvextend -m 1 /dev/vg03/lvol5 /dev/dsk/c0t4d0 ---- etc….
Step 7: Check with "lvlnboot -v" to see both disks
# lvlnboot -v /dev/vg03
Boot Definitions for Volume Group /dev/vg03:
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
Step 8: Check with lvdisplay -v /dev/vg03/lvol[ 1 ]
which should show both disks available and should
both be ‘current’ and NOT ‘stale’.
# lvdisplay -v /dev/vg03/lvol1 | pg
--- Logical volumes ---
LV Name /dev/vg03/lvol1
VG Name /dev/vg03
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
Step 9: Set the new disk to be secondary boot device
either in IPL or at command level :
setboot = displays
# 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 this was the tape drive 10/12/5.0.0 ]
Step 10:
# Shutdown –r –y 0
Interact with ISL
BO ALT
Tuesday, April 30, 2013
HOWTO Mirror HPUX Root Disk
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment