Deepees’s Blog

Just another WordPress.com weblog

HP-UX mirroring the boot disk Itanium

Posted by deepees on February 18, 2009

How to mirror a root LVM disk on Itanium systems
HP-UX V2.0 or later

Assume that the primary disk is at c0t0d0 and secondary disk is at c1t0d0.
Read with diskinfo the size of ALL partitions on the primary disk and divide the disk size by 1024 and built ALL partions with this size on the new mirror disk. If you use HPUX 100% you are not sure that both HPUX partions get the same size.

1.     diskinfo /dev/rdsk/c0t0d0s1 repeat on s2 s3


The above output shows 512000kB and divided by 1024 gives 500MB
Use vi to create a partition description file by doing the following:

1.     vi /tmp/partitionfile


For HPUX HP-UX 11i v2 and later the 4 line entry should look like this:
3
EFI 500MB
HPUX 100% or XXXXMB
HPSP 400MB

This sets sections S1 as the EFI partition, S2 as the HPUX LVM partition, and S3 as the HP Service Partition.
Use idisk to setup the disk partitioning using the file created above:

1.     idisk -wf /tmp/partitionfile /dev/rdsk/c1t0d0

idisk version: 1.2
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? Yes
...

1.     idisk -p /dev/rdsk/c1t0d0


Use insf to create the new device block and character device files

1.     insf –e –C disk


Verify the files where successfully created

1.     ls –la /dev/dsk/c1t0d0* /dev/rdsk/c1t0d0*


Initialize the HP-UX partition for LVM booting. Pvcreate the new subpartition – make sure specify s2 !

1.     pvcreate -B /dev/rdsk/c1t0d0s2


Use mkboot(1M) to format the EFI partition (s1), populate it with the EFI files under /usr/lib/efi/, format the LIF volume (part of s2), and populate it with the LIF files (ISL, AUTO, HPUX, LABEL) under /usr/lib/uxbootlf:

1.     mkboot -e -l /dev/rdsk/c1t0d0


Verify the EFI files were successfully copied to the S1 partition:

1.     efi_ls -d /dev/rdsk/c1t0d0s1


Verify the LIF files were successfully copied to the LIF volume(ISL,AUTO,HPUX,LABEL) copied from /usr/lib/uxbootlf:

1.     lifls -l /dev/rdsk/c1t0d0s2

Configure the AUTO file on both disks to allow uninterrupted booting:

1.     mkboot –a “boot vmunix –lq” /dev/rdsk/c0t0d0

2.     mkboot –a “boot vmunix –lq” /dev/rdsk/c1t0d0

Verify the AUTO file on both disks:

1.     efi_cp –d /dev/rdsk/c0t0d0s1 –u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x

2.     efi_cp –d /dev/rdsk/c1t0d0s1 –u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x

Copy HP Service Partition from the existing boot disk to the new mirror disk:

1.     dd if=/dev/rdsk/c0t0d0s3 of=/dev/rdsk/c1t0t0s3 bs=1024k

Verify the files and directories where successfully copied to the S3 partition:

1.     efi_ls –d /dev/rdsk/c1t0d0s3

Since the HPSP is not under LVM control, the contents need to be copied as shown above or installed from the ECU Support CD. For pre HP-UX v2.0 the HPSP does not exist so this step can be skipped.

Extend vg to include new disk sub-partition s2.

1.     vgextend /dev/vg00 /dev/dsk/c1t0d0s2


Extend lvols to new sub-partition on the disk(lvol1, lvol2,lvol3,lvol4….)

1.     lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0s2

…. lvextend -m 1 (additional LV)…
Update lvol boot paths

1.     lvlnboot -r /dev/vg00/lvol3 /dev/vg00

2.     lvlnboot -b /dev/vg00/lvol1 /dev/vg00

3.     lvlnboot -s /dev/vg00/lvol2 /dev/vg00

4.     lvlnboot -d /dev/vg00/lvol2 /dev/vg00

Verify that the boot paths for Boot, Root, Swap and Dump have been correctly set in the LABEL file:

1.     lvlnboot –v

Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t2d0s2 (0/0/1/1.0.0) — Boot Disk
/dev/dsk/c1t0d0s2 (0/1/1/1.1.0) — Boot Disk
Boot: lvol1 on: /dev/dsk/c0t0d0s2
/dev/dsk/c1t0d0s2
Root: lvol3 on: /dev/dsk/c0t0d0s2
/dev/dsk/c1t0d0s2
Swap: lvol2 on: /dev/dsk/c0t0d0s2
/dev/dsk/c1t0d0s2
Dump: lvol2 on: /dev/dsk/c0t0d0s2, 0

Verify the mirror configurations are correct and active:

1.     vgdisplay –v /dev/vg00

Specify the mirrored disk as an alternate bootpath
# setboot (to check it)
# setboot -a <HW path of mirror> (sets Alternate)
# setboot -ha <HW path of mirror> (sets HA Alternate)
# setboot (to check it)
HA Alternate is only applicable to cell-based systems running HP-UX V2.0 or later

 

 

Leave a comment