Using MirrorDisk/UX to mirror vg00 on an HP-UX 11.31 Itanium server

Where PRIMARY is the current OS disk and SECONDARY is the disk on which you want to create the mirror:

# idisk -Rw /dev/rdisk/SECONDARY

# echo "3" > /tmp/pdf
# echo "EFI $(diskinfo /dev/rdisk/PRIMARY_p1 | grep size | while read label size kbytes; do echo ${size}/1024 | bc; done)MB" >> /tmp/pdf
# echo "HPUX $(diskinfo /dev/rdisk/PRIMARY_p2 | grep size | while read label size kbytes; do echo ${size}/1024 | bc; done)MB" >> /tmp/pdf
# echo "HPSP $(diskinfo /dev/rdisk/PRIMARY_p3 | grep size | while read label size kbytes; do echo ${size}/1024 | bc; done)MB" >> /tmp/pdf

# idisk -f /tmp/pdf -w /dev/rdisk/SECONDARY
# idisk /dev/rdisk/SECONDARY

# ioscan; insf -e -C disk; ioscan -fnNC disk

# efi_fsinit -d /dev/rdisk/SECONDARY_p1
# pvcreate -B /dev/rdisk/SECONDARY_p2
# vgextend vg00 /dev/disk/SECONDARY_p2
# mkboot -e -l /dev/rdisk/SECONDARY

# efi_ls -d /dev/rdisk/PRIMARY_p1
# efi_ls -d /dev/rdisk/SECONDARY_p1

# lifls -l /dev/rdisk/PRIMARY_p2
# lifls -l /dev/rdisk/SECONDARY_p2

# mkboot -a "boot vmunix -lq" /dev/rdisk/PRIMARY
# mkboot -a "boot vmunix -lq" /dev/rdisk/SECONDARY

# efi_cp -d /dev/rdisk/PRIMARY_p1 -u /EFI/HPUX/AUTO /tmp/prim
# cat /tmp/prim

# efi_cp -d /dev/rdisk/SECONDARY_p1 -u /EFI/HPUX/AUTO /tmp/mir
# cat /tmp/mir

# for i in `pvdisplay -v /dev/disk/PRIMARY_p2 | grep 'current.*0000 $' | awk 'BEGIN{ ORS=" " }{ print $3 }'`; do echo lvextend -m 1 $i /dev/disk/SECONDARY_p2; done | sh -x

# lvlnboot -R /dev/vg00
# lvlnboot -v

# setboot -a SECONDARY_DISK_HW_PATH

# echo "1 /dev/disk/SECONDARY_p2" >> /stand/bootconf

# dd if=/dev/rdisk/PRIMARY_p3 of=/dev/rdisk/SECONDARY_p3 bs=1024k
Advertisements