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.
# 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:
# 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:# 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
…
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? Yes
…
# idisk -p /dev/rdsk/c1t0d0
Use insf to create the new device block and character device files
# insf –e –C disk
Verify the files where successfully created
# ls –la /dev/dsk/c1t0d0* /dev/rdsk/c1t0d0*
Initialize the HP-UX partition for LVM booting. Pvcreate the new subpartition – make sure specify s2 !# 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:
# mkboot -e -l /dev/rdsk/c1t0d0
Verify the EFI files were successfully copied to the S1 partition:# efi_ls -d /dev/rdsk/c1t0d0s1
Verify the EFI files were successfully copied to the S1 partition:# 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:# lifls -l /dev/rdsk/c1t0d0s2Configure the AUTO file on both disks to allow uninterrupted booting:# mkboot –a “boot vmunix –lq” /dev/rdsk/c0t0d0
# mkboot –a “boot vmunix –lq” /dev/rdsk/c1t0d0
Verify the AUTO file on both disks:# efi_cp –d /dev/rdsk/c0t0d0s1 –u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x
# 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:# dd if=/dev/rdsk/c0t0d0s3 of=/dev/rdsk/c1t0t0s3 bs=1024k
Verify the files and directories where successfully copied to the S3 partition:# 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.# vgextend /dev/vg00 /dev/dsk/c1t0d0s2
Extend lvols to new sub-partition on the disk(lvol1, lvol2,lvol3,lvol4….)# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0s2
…. lvextend -m 1 (additional LV)…
…. lvextend -m 1 (additional LV)…
Update lvol boot paths# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00Verify that the boot paths for Boot, Root, Swap and Dump have been correctly set in the LABEL file:
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00Verify that the boot paths for Boot, Root, Swap and Dump have been correctly set in the LABEL file:
# 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
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:
# vgdisplay –v /dev/vg00
Specify the mirrored disk as an alternate bootpath
# setboot (to check it)
# 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)
0 comments:
Post a Comment