Mirroring root disk on HP-UX 11iv3
This post have been resting in a dust a way too long but now I’m going to fix that by guiding you through a very important and sometimes a vital process as a root disk mirroring on HP-UX. Truth to be told that there is no single grain of rocket science so treat it as a pure reference. Lets imagine that disk3 is a current boot device and disk5 will be our new mirror.
- Run the following commands to determine the size (in megabytes) of EFI, HP-UX and HSPS of the boot device:
- Next, prepare a file, i.e. /tmp/partitionfile, with the following content:
- It’s quite convenient to have a list of disks before making the changes so once they’re applied they will be vividly visible at once:
- Create the partitions on a new disk and with insf command make them available to OS by creating the device files:
# idisk -f /tmp/partitionfile -w /dev/rdisk/disk5 # insf -e
- Make it bootable:
- Extend the root volume group:
- To complete the setup of the disk as a boot disk run mkboot command:
- Create a temporary AUTO file and use the efi_cp command to copy it to the mirror, using the block device of the first (EFI) partition. The –lq option ensures that the system will boot without quorum. In the event of the primary boot disk failing this will allow the mirror disk to boot.
- Now proceed with mirroring your logical volumes. I used pvdisplay to get an ordered list of the volumes to be able to create the mirrored volumes in the same order.
- Prepare LVM logical volume to be root, boot, primary swap, or dump volume:
- Finally, add the new disk to boot device configuration table:
- Set the alternate boot path to the mirror_disk:
- If the mirror disk includes an HPSP partition, use the efi_fsinit command on the character device file for the HPSP (third) partition to initialize it with an EFI file system:
# diskinfo -b /dev/rdisk/disk3_p1 | awk '{print $1/1024}' # diskinfo -b /dev/rdisk/disk3_p2 | awk '{print $1/1024}' # diskinfo -b /dev/rdisk/disk3_p3 | awk '{print $1/1024}'
3 EFI 500MB HPUX 100% HPSP 400MB
# ioscan -fnC disk # ioscan -m dsf
# pvcreate -f -B /dev/rdisk/disk5_p2
# vgextend vg00 /dev/disk/disk5_p2 Volume group "vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# mkboot -e -l /dev/disk/disk5
The -e option tells mkboot to use EFI layout and the -l option tells mkboot that this volume will be used by a volume manager (even if it is not currently used by one)
# print 'boot vmunix -lq' > /tmp/AUTO # efi_cp -d /dev/disk/disk5_p1 /tmp/AUTO EFI/HPUX/AUTO
# pvdisplay -v /dev/disk/disk3_p2 | grep "current.*00000" # /usr/sbin/lvextend -m 1 /dev/vg00/lvol1 /dev/disk/disk5_p2 # /usr/sbin/lvextend -m 1 /dev/vg00/lvol2 /dev/disk/disk5_p2 # /usr/sbin/lvextend -m 1 /dev/vg00/lvol3 /dev/disk/disk5_p2 # /usr/sbin/lvextend -m 1 /dev/vg00/lvol4 /dev/disk/disk5_p2 # /usr/sbin/lvextend -m 1 /dev/vg00/lvol5 /dev/disk/disk5_p2 ...
# /usr/sbin/lvlnboot -b /dev/vg00/lvol1 # /usr/sbin/lvlnboot -r /dev/vg00/lvol3 # /usr/sbin/lvlnboot -s /dev/vg00/lvol2 # /usr/sbin/lvlnboot -d /dev/vg00/lvol2 # /usr/sbin/lvlnboot –R
# /usr/bin/echo “l /dev/disk/disk5_p2” >> /stand/bootconf
# /usr/sbin/setboot -a /dev/disk/disk5_p2
# /usr/sbin/efi_fsinit -d /dev/rdisk/disk5_p3
on November 16, 2014 at 2:24 pm
·