Sie sind auf Seite 1von 22

Creating Boot Mirrors on

HP Integrity
A guide to LVM Boot Mirrors for HP-UX on Integrity Systems
By Michelle Grosse

Boot and Mirroring (Overview)


EFI and HP Integrity boot disk layout EFI and HP-UX Hardware Paths LVM Boot disk mirroring Boot Disk Replacement LVM Boot Mirroring Checklist

February 2007

HP Integrity Boot Disk Layout (1)


February 2007

/dev/dsk/c0t0d0 = whole disk /dev/dsk/c0t0d0s1 = EFI System Partition /dev/dsk/c0t0d0s2 = HP-UX Partition /dev/dsk/c0t0d0s3 = HP Service Partition
3

HP Integrity Boot Disk Layout (2)


EFI

System Partition

Contains directories, data files, EFI loadable images Default size 500 MB (11i V2), 100 MB (earlier versions) Can be viewed from HP-UX using efi_ls (1M) utility Can be viewed from EFI using EFI shell (fsn:, ls)
HP

Service Partition

Introduced to HP-UX 11i V2 Created during HP-UX installation. Note that upgrades to 11i V2 do not have it! Default size 400 MB Can be viewed from HP-UX using efi_ls (1M) utility Can be viewed from EFI using EFI shell (fsn:, ls)
February 2007 4

EFI and HP-UX Hardware Paths (1)

The firmware responsible for the early stages of the boot process uses EFI hardware addressing which can be mapped to HP-UX hardware paths

February 2007

EFI and HP-UX Hardware Paths (2)

New to HP-UX 11i V2 is an option flag -e to ioscan that displays the EFI hardware address associated to a device hardware path

February 2007

Boot Disk Mirroring - LVM


Requires

Mirror Disk/UX Bundle

(included with Mission Critical Operating Environment)

The following disks are used throughout the examples:


Source (existing) boot disk = c2t0d0 Target (new) mirror disk = c2t1d0

IMPORTANT: For all LVM commands that use a device file be sure to specify the s2 device!

February 2007

LVM Boot Disk Mirroring (1)


Step 1. Verify the HP Mirror Disk/UX product is installed
# swlist l fileset | grep i mirror

Step 2. Set up the disk partitions for the new mirror disk
a. Determine the partition sizes for your current boot disk:
# diskinfo /dev/rdsk/c2t0d0s1 | grep size # diskinfo /dev/rdsk/c2t0d0s3 | grep size {EFI partition} {HPSP partition}

b. Create a partition description file:


HP-UX 11i v1.6 # vi /tmp/partitionfile 2 EFI 100MB HPUX 100% HP-UX 11i v2.0 # vi /tmp/partitionfile 3 EFI 500MB HPUX 100% HSP 400MB

February 2007

LVM Boot Disk Mirroring (2)


Step 2. Set up the disk partitions for the new mirror disk (continued)
c. Partition and verify the new mirror disk:
# idisk f /tmp/partitionfile w /dev/rdsk/c2t1d0 # idisk /dev/rdsk/c2t1d0

Step 3. Create the device files for the new partitions


a. Create the block and character device files for the new disk:
# insf e C disk

b. Verify the file were successfully created:


# ls la /dev/dsk/c2t1d0* /dev/rdsk/c2t1d0*

Step 4. Initialize the HP-UX partition for LVM booting


# pvcreate B /dev/rdsk/c2t1d0s2

February 2007

LVM Boot Disk Mirroring (3)


Step 5. Initialize/populate EFI partition and LIF volume
a. Initialize and populate:
# mkboot e l /dev/rdsk/c2t1d0

b. Verify the EFI files were successfully copied to the s1 partition:


# efi_ls d /dev/rdsk/c2t1d0s1

c. Verify the LIF files were successfully copied to the LIF volume:
# lifls l /dev/rdsk/c2t1d0s2

EFI files are copied from /usr/lib/efi LIF volume files (ISL, AUTO, HPUX, LABEL) are copied from /usr/lib/uxbootlf

February 2007

10

LVM Boot Disk Mirroring (4)


Step 6. Configure the AUTO file on both disks to allow booting without interruption
a. Boot disk:
# mkboot a boot vmunix lq /dev/rdsk/c2t0d0

b. Mirror disk:
# mkboot a boot vmunix lq /dev/rdsk/c2t1d0

c. Verify AUTO files:


# efi_cp -d /dev/rdsk/c2t0d0s1 u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x # efi_cp d /dev/rdsk/c2t1d0s1 u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x

February 2007

11

LVM Boot Disk Mirroring (5)


Step 7. Copy the HP Service Partition from the existing boot disk to the new mirror disk
a. Copy the partition:
# dd if=/dev/rdsk/c2t0d0s3 of=/dev/rdsk/c2t1d0s3 bs=1024k

b. Verify the files and directories were successfully copied to the s3 partition:
# efi_ls d /dev/rdsk/c2t1d0s3

Since the HPSP is not under LVM control, the contents need to be copied as shown above or installed from the ECU Support CD. In the case of HP Integrity systems running HP-UX 11i versions earlier than v2.0, the HPSP does not exist so Step 7 can be skipped.

February 2007

12

Step 8. Extend the volume group to include the mirror disk boot partition
# vgextend /dev/vg00 /dev/dsk/c2t1d0s2

LVM Boot Disk Mirroring (6)

Step 9. Mirror each of the logical volumes


a. Determine all of the volumes to be mirrored:
# vgdisplay v vg00 | grep LV Name

b. Enable mirroring for each volume:


# # # # # # # # lvextend lvextend lvextend lvextend lvextend lvextend lvextend lvextend m m m m m m m m 1 1 1 1 1 1 1 1 /dev/vg00/lvol1 /dev/vg00/lvol2 /dev/vg00/lvol3 /dev/vg00/lvol4 /dev/vg00/lvol5 /dev/vg00/lvol6 /dev/vg00/lvol7 /dev/vg00/lvol8 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 /dev/dsk/c2t1d0s2 {/stand} {swap} {/} {/tmp} {/home} {/opt} {/usr} {/var}

February 2007

13

LVM Boot Disk Mirroring (7)


Step 9. Mirror each of the logical volumes (continued)
c. Verify that the boot paths for Boot, Root, Swap and Dump have been correctly set in the LABEL file:
# lvlnboot -v If any boot paths are missing, then set them: # # # # lvlnboot lvlnboot lvlnboot lvlnboot r b s d /dev/vg00/lvol3 /dev/vg00/lvol1 /dev/vg00/lvol2 /dev/vg00/lvol2 {Root} {Boot} {Swap} {Dump}

d. Verify the mirror configurations are correct and active:


# vgdisplay v vg00

Each logical volume should show LV Status as available/syncd and the number of physical volumes (Used PV) equal to 2.
February 2007 14

LVM Boot Disk Mirroring (8)


Step 10. Verify the mirrored disk has been set as an alternate boot path for the EFI Boot Manager
a. Verify
# setboot

b. Change/modify only if needed # setboot a 0/1/1/0.1.0 # setboot h 0/1/1/0.1.0 c. Verify


# setboot Primary bootpath : 0/1/1/0.0.0 HA Alternate bootpath : 0/1/1/0.0.0 Alternate bootpath : 0/1/1/0.1.0 Autoboot is ON (enabled)

(sets Alternate) (sets HA Alternate)

HA Alternate is only applicable to cell-based systems running HP-UX v2.0+

February 2007

15

LVM Boot Disk Mirroring (9)


Step 11. Create an EFI boot option for the mirror disk
(not needed for HP-UX 11i v2.0 or higher)
a. Reboot system and enter the EFI Boot Option Maintenance Manager menu b. Select the option Add a Boot Option c. Select the mirror disk d. Change to the EFI directory e. Change to the HPUX directory f. Select the HP-UX boot loader HPUX.EFI g. Choose the option to make a new entry (N New) h. Enter a description e.g. HP-UX Secondary (Mirror) boot disk

Step 12. Verify and boot the new mirror disk

February 2007

16

February 2007

17

Boot Disk Replacement


HP

Integrity

Must run idisk to partition replacement disk before running mkboot, lvlnboot or vgcfgrestore. Note that vgcfgrestore does not restore the EFI partition or LIF volumes this is done through mkboot. Running idisk creates a new disk identifier for a disk. If an EFI boot option entry still exists (in NVRAM) for the replaced disk then the old entry must be removed. Be certain to specify the s2 device file for LVM commands (e.g. /dev/rdsk/c2t0d0s2)
HP9000

and HP Integrity

No difference for non-root disks Both platforms reference whole disk device files for nonroot disks (e.g. /dev/rdsk/c2t0d0)
February 2007 18

LVM Boot Disk Mirroring Checklist (1)


Note - examples use:
- source boot disk = c2t0d0 - target mirror disk = c2t1d0

Step 1. Verify the HP Mirror Disk/UX product is installed


# swlist l fileset | grep i mirror

Step 2. Set up the disk partitions for the new mirror disk
# diskinfo /dev/rdsk/c2t0d0s1 | grep size # diskinfo /dev/rdsk/c2t0d0s3 | grep size HP-UX 11i v1.6 # vi /tmp/partitionfile 2 EFI 100MB HPUX 100% HP-UX 11i v2.0 # vi /tmp/partitionfile 3 EFI 500MB HPUX 100% HSP 400MB (Determine the partition sizes - EFI) (Determine the partition sizes - HPSP)

(Create the partition file)

# idisk f /tmp/partitionfile w /dev/rdsk/c2t1d0 # idisk /dev/rdsk/c2t1d0

(Partition the new mirror disk) (Verify)

Step 3. Create the device files for the new partitions


# insf e C disk # ls la /dev/dsk/c2t1d0* /dev/rdsk/c2t1d0* (Create device files) (Verify)

February 2007

19

LVM Boot Disk Mirroring Checklist (2)


Step 4. Initialize the HP-UX partition for booting under LVM
# pvcreate B /dev/rdsk/c2t1d0s2

Step 5. Initialize and populate the EFI partition and LIF volume
# mkboot e l /dev/rdsk/c2t1d0 # efi_ls d /dev/rdsk/c2t1d0s1 # lifls l /dev/rdsk/c2t1d0s2 (Initialize and populate) (Verify) (Verify)

Step 6. Configure the AUTO file on both disks to allow booting without interruption
# # # # mkboot mkboot efi_cp efi_cp a a -d d boot vmunix lq /dev/rdsk/c2t0d0 boot vmunix lq /dev/rdsk/c2t1d0 /dev/rdsk/c2t0d0s1 u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x /dev/rdsk/c2t1d0s1 u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x (Boot disk) (Mirror disk) (Verify AUTO files) (Verify AUTO files)

Step 7. Copy the HP Service Partition from the existing boot disk to the new mirror disk
# dd if=/dev/rdsk/c2t0d0s3 of=/dev/rdsk/c2t1d0s3 bs=1024k # efi_ls d /dev/rdsk/c2t1d0s3 (Verify)

Step 8. Extend the volume group to include the mirror disk boot partition
# vgextend /dev/vg00 /dev/dsk/c2t1d0s2

February 2007

20

LVM Boot Disk Mirroring Checklist (3)


Step 9. Mirror each of the logical volumes
# # # # # # # # # vgdisplay v vg00 | grep LV Name lvextend m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol2 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol3 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol4 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol5 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol6 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol7 /dev/dsk/c2t1d0s2 lvextend m 1 /dev/vg00/lvol8 /dev/dsk/c2t1d0s2 (Determine volumes to mirror) {/stand} {primary swap} {/} {/tmp} {/home} {/opt} {/usr} {/var} (Verify boot paths are set)

# lvlnboot v If any boot paths are missing, then set them: # # # # lvlnboot lvlnboot lvlnboot lvlnboot r b s d /dev/vg00/lvol3 /dev/vg00/lvol1 /dev/vg00/lvol2 /dev/vg00/lvol2 {Root} {Boot} {Swap} {Dump}

# vgdisplay v vg00

(Verify mirrors are current and active)

February 2007

21

LVM Boot Disk Mirroring Checklist (4)


Step 10. Verify the mirrored disk has been set as an alternate boot path for the EFI Boot Manager
# setboot Change/modify if needed: # setboot a 0/1/1/0.1.0 # setboot h 0/1/1/0.1.0 # setboot (sets Alternate) (sets HA Alternate for cell based systems running v2.0 or higher) (Verify)

Step 11. Create an EFI boot option for the mirror disk (not needed for HP-UX 11i v2.0 or higher)
a. Reboot the system and enter the EFI Boot Option Maintenance Manager menu b. Select the option Add a Boot Option c. Select the mirror disk d. Change to the EFI directory e. Change to the HPUX directory f. Select the HP-UX boot loader HPUX.EFI g. Choose the option to make a new entry (N New) h. Enter a description e.g. HP-UX Secondary (Mirror) boot disk

Step 12. Verify and boot the new mirror disk

February 2007

22

Das könnte Ihnen auch gefallen