Beruflich Dokumente
Kultur Dokumente
Table of Contents
Abstract.............................................................................................................................................. 2
Introduction......................................................................................................................................... 2
Deployment ..................................................................................................................................... 2
System Recovery .............................................................................................................................. 2
How to Deploy Mirrored Disk Systems with Ignite-UX ............................................................................... 3
How to mirror the root disk on an HP 9000 system .............................................................................. 3
How to mirror the root disk on an HP Integrity Server ........................................................................... 5
How to Recover Mirrored Disk Systems with Ignite-UX using make_tape_recovery .................................... 8
How to Recover Mirrored Disk Systems with Ignite-UX via make_net_recovery ......................................... 9
An Example config.local File ........................................................................................................... 10
Glossary........................................................................................................................................... 15
For More Information ......................................................................................................................... 15
Abstract
It is a common misconception that Ignite-UX cannot be used with systems containing mirrored disks.
While it is true that Ignite-UX does not have any built-in support for mirrored disks, it is not true that
Ignite-UX cannot be used on systems with mirrored disks. Ignite-UX is still a very valuable tool for
use on systems configured with LVM mirroring.
This white paper has two primary goals:
1. Explain benefits and limitations of using Ignite-UX with LVM mirroring.
2. Explain how to use Ignite-UX with LVM mirroring
Introduction
Ignite-UX is a tool set used for the deployment (cold installation) and recovery of HP-UX on HP
systems. The make_tape_recovery and make_net_recovery tools are used to build a
customized recovery image that can be used in the event of a root volume group failure.
MirrorDisk/UX must be installed on a system to enable LVM mirroring functionality. None of the
Ignite-UX tools are "aware" of mirrored disks.
This white paper has not yet been updated to provide instructions on how to automatically re-mirror
a system after recovery with HP-UX 11i v3. It is expected that Ignite-UX configuration required will
be substantially different to what is already presented in this white paper. A new section will be
added to this white paper addressing re-mirroring HP-UX 11i v3 boot disks during the first half of
2008.
Deployment
In the case of cold installation (deployment), the fact that Ignite-UX is not aware of mirrored disks
means:
• When describing how your system's disks will be configured using the Ignite-UX user interface, it
is not possible to specify any disk mirroring information.
• There are no Ignite-UX configuration file keywords that allow you to specify any disk mirroring.
It is, of course, possible to use Ignite-UX to cold install your system. You can then set up your
system’s mirrored disks with the LVM commands, or by using System Administration Manager
(SAM) or System Management Homepage (SMH) (for all volume groups except the root volume
group).
System Recovery
In the case of recovery (make_tape_recovery and make_net_recovery), the fact that Ignite-
UX is not aware of mirrored disks means that the system being recovered may have had mirrored
disks prior to the problem that forced the system recovery. Of course, with a mirrored root disk you
are much less likely to ever need to recover a failed root disk using make_tape_recovery or
make_net_recovery. Nonetheless, mirroring your root disk does not cover all of the cases that
system recovery can handle. For example:
• There has been a catastrophic software error on the root disk that has also affected the mirror.
For example, executing rm -rf * while in the root (/) directory.
2
• The primary disk has a hardware failure and the mirror also fails before the primary can be
replaced.
• You are about to update your system to a new operating system release or add new patches to
the system. Creating a recovery archive allows you to get back to a working system if the update
does not succeed.
During such a recovery, Ignite-UX will not automatically re-create the LVM mirrors. The mirrors need
to be created via LVM commands or SAM/SMH after the recovery is complete.
Note:
Later in this white paper we will be discussing how you can add
configuration into a recovery archive to automatically reestablish LVM
mirroring of the root volume group.
Note:
If your setup requires more than one disk to complete mirroring, the
second and any subsequent disks should not have pvcreate executed
on them with the –B option. You may need to use the –f option to force
pvcreate to operate on the disk if it has been used by LVM previously.
2. Extend the disk into the root volume group, at this point you should also extend any other disks
required into the root volume group.
# vgextend /dev/vg00 /dev/dsk/<second disk>
3
3. The mkboot command must be run on the alternate boot disk so that a copy of the primary and
secondary loader (and other things) are placed into the LIF 1 space that was reserved by using the
–B option to pvcreate in Step 1.
4. Update the boot string in the AUTO file in the LIF on the alternate boot disk. The –lq should be
placed in the AUTO file to ensure that the system will attempt to boot without quorum. In the event
that the primary boot disk fails, this will allow the alternate boot disk to boot if it is not available.
# mkboot -a "hpux -lq" /dev/rdsk/<second disk>>
5. Mirror the disks by extending all of the logical volumes, in order, onto the alternate boot disk.
Note:
The boot, root and primary swap/dump file systems must be
contiguous. If you need to mirror to more than one disk, you may need
to add a second disk or change the name of the disk being used when
extending the logical volumes.
6. Reestablish the location of boot, root and primary swap/dump file systems within LVM using
(or modifying as needed) the following commands:
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2
# lvlnboot -R
7. You must add the boot disk to the file, /stand/bootconf. A new line must be inserted in this
file when using LVM and it should start with an “l” (lower case letter L), and then followed by
1
Logical Interchange Format, see manual page lif(4) for more information.
4
the block disk device of the alternate boot disk. This is to ensure that when software is installed
the contents of the boot LIF both disks are updated.
# cat /stand/bootconf
l /dev/dsk/<boot disk>
After creating an alternate boot disk using LVM, HP recommends you test that it can boot and
operates as expected.
2. The three commands in the previous step show the size in Megabytes of the EFI partition (section
1), the HP-UX partition (section 2), and the HPSP partition (section 3). Place those values into the
following command:
# print '3\nEFI 500MB\nHPUX *****MB\nHPSP 400MB' > /tmp/partitionfile
Or you can choose to create the /tmp/partitionfile file using vi when performing this
interactively.
Note:
If you do not have a HPSP partition, the initial 3
in the command should be 2 and the command would
instead look like:
If the boot disk and the alternate boot disk are different sizes, and you do not wish to calculate
the size of the HP-UX partition, you could execute the print command as follows:
# print '3\nEFI 500MB\nHPUX 100%\nHPSP 400MB' > /tmp/partitionfile
This creates the EFI and HPSP partitions at a fixed size and allocates 100% of the remaining
space to the HP-UX partition.
3. The alternate boot disk must be partitioned using the file /tmp/partitionfile created in the
previous step. This action is performed using the idisk command and echo yes is used to
2
This is the HP Service Partition. You should always let this partition be created when installing an HP Integrity server, as it holds the offline
diagnostics for HP Integrity systems.
5
answer all of the idisk queries. You may choose not to include this part of the command and
answer the question when performing this task interactively. Remove the partition file created
previously as follows:
# echo yes | idisk -wf /tmp/partitionfile /dev/rdsk/<second disk>
# rm /tmp/partitionfile
4. After creating the partitions on the disk you will need to create the device files associated with
the partitions:
# insf –e –H <hardware path to second disk>
5. Create the disk as a bootable LVM disk. The use of s2 at the end of the disk device is needed
since LVM uses the HP-UX partition so you must use this section of the disk as well. If you were to
use just the disk device, it would overwrite the partition information that has been created on the
disk. If this disk has been previously used by LVM in this way you may need to add the -f option
to force the initialization of this disk.
# pvcreate -B /dev/rdsk/<second disk>s2
6. Now, run mkboot to complete the setup of the disk as a boot disk.
# mkboot -e -l /dev/dsk/<second disk>
The -e option sets the use of an EFI layout and the -l option sets this volume to be used by a
volume manager (even if it is not currently used by one).
Note:
If no partition number is given to mkboot, the command examines the
whole disk.
7. Initialize the HPSP partition with an EFI file system. This does not place any data into the
partition; it simply initializes HPSP partition with an EFI file system. Proceed to the next step if you
are not creating a HPSP partition or execute the following command.
# efi_fsinit -d /dev/rdsk/<second disk>s3
8. Extend the HP-UX partition into the root volume group. The HP-UX partition (section 2) is
extended into the volume group not the whole disk.
# vgextend /dev/vg00 /dev/dsk/<second disk>s2
9. Extend the mirrors to the alternate boot disk. There may be varying numbers of logical volumes
to extend and the names may be different to those indicated in the following commands so you
should modify these commands as needed.
Note:
The root, primary swap/dump, and the boot file systems should be
mirrored before any other file system is mirrored.
6
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/<second disk>s2
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/<second disk>s2
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/<second disk>s2
# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/<second disk>s2
.
.
.
10. Reestablish the location of the root, primary swap/dump, and the boot file systems within
LVM using the following commands modifying the logical volumes if necessary:
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2
# lvlnboot -R
11. Set up the AUTO file in the EFI partition to ensure that if the primary boot disk fails that the
system will be able to boot from the alternate boot disk without quorum:
# print 'boot vmunix -lq' > /tmp/AUTO
# efi_cp -d /dev/dsk/<second disk>s1 /tmp/AUTO EFI/HPUX/AUTO
# rm /tmp/AUTO
12. Set the path to the alternate boot device to be the disk that has just been created, enter:
# setboot -a <hardware path of second disk>
13. Ignite-UX does not preserve the Offline Diagnostics in the HPSP partition on the boot disk that it
creates. That means that you must reinstall the contents of the HPSP partition from the HP Itanium
Processor Family Diagnostics and Utilities CD that is appropriate for your system. When you
choose to install the diagnostics to a HPSP partition, it will only be installed to one partition. After
installation you must determine the partition on which the diagnostics have been installed using
the following command:
# efi_ls –d /dev/rdsk/<device>s3 /
The diagnostics are present on one partition only. You can then copy the diagnostics to another
HPSP partition using the following command:
# dd if=/dev/rdsk/<from device>s3 of=/dev/rdsk/<to device>s3 \
bs3=1024k
When you update the offline diagnostics, you must remember to update the other HPSP partition
so that the updated diagnostics are available from both partitions.
7
# mkdir /var/HPSP
# dd if=/dev/dsk/<boot disk>s3 bs=1024k | gzip > \
> /var/HPSP/<boot disk>.save.gz
# dd if=/dev/dsk/<second disk>s3 bs=1024k | gzip > \
> /var/HPSP/<second disk>.save.gz
Run make_tape_recovery or make_net_recovery ensuring that /var/HPSP (or where
you have placed the copies of the HPSP partitions) is included into the recovery archives. After
recovery you can then restore the diagnostics as in the following example:
# gzcat < /var/HPSP/<boot disk>.save.gz | \
> dd of=/dev/dsk/<boot disk>s3 bs=1024k
# gzcat < /var/HPSP/<second disk>.save.gz | \
> dd of=/dev/dsk/<second disk>s3 bs=1024k
Note:
If you include configuration into Ignite-UX configuration files to perform
these actions automatically after a recovery, you should ensure that this
recovery archive will not be used to clone a system on which these
offline diagnostics will not work.
After creating an alternate boot disk using LVM, HP recommends that you test that it can boot and
operates as expected.
Important:
If you choose to pursue the second option a recovery tape created in
this way should NOT be used to clone systems unless they contain very
similar hardware.
8
To integrate the configuration of disk mirrors into the recovery process we will be using a feature of
the make_tape_recovery command. The make_tape_recovery command automatically
includes the /var/opt/ignite/recovery/config.local file, if it exists, into any
make_tape_recovery configuration.
Caution:
If you perform a preview when using these instructions (using the –p
option) there is a defect in make_tape_recovery that prevents
the config.local file from being included into the configuration
when you resume the make_tape_recovery command (using
the –r option). If you plan on performing a preview and resume
operation you should upgrade to Ignite-UX version C.6.2 or later where
this defect has been addressed.
Note:
The make_net_recovery command is automatically executed when
you use the Ignite-UX GUI for network recovery.
9
If you already have recovery configurations for this client and would like them to use the
config.local file, edit the /var/opt/ignite/clients/0x{LLA}/CINDEX file to include a
reference to “recovery/config.local” in all of the configuration clauses.
The commands required to configure mirrored disks can be included as a post_config_cmd
script, which executes automatically after the system has been restored.
After creating or modifying the config.local file, it is recommended you run instl_adm -T
-f config.local, to ensure that the syntax is correct and that the file is error free.
The config.local file used for make_net_recovery is identical to is used for
make_tape_recovery. The only difference is the location of the config.local file for each
command.
Important:
In spite of efforts to minimize split lines in the following example
config.local file, it is possible that some may exist. If you choose to
use this exact text, HP recommends that you review your file for
completeness and ensure that no lines have been split inappropriately.
post_config_cmd +="
10
cpu=$(/usr/bin/getconf CPU_VERSION)
if [ $cpu = 532 ]
then
CPU=PA
else
CPU=IA
fi
# Recreate a mirror of the boot disk. This assumes that the root
# volume group was mirrored when this configuration was added
# if this is an initial mirroring the disk does not have to be
# reduced from the volume group.
# I want 1 disk with 0 lvols and another disk with more than 2.
# Lets Check Which Disk has lvols on it and use that as the primary.
11
# Make sure the disk is removed from the group by using vgreduce.
# Once reduced we need to section the disk with the idisk command
# the sizes of the EFI and HPSP sections need to match the mirror.
# This assumes that there is a HP Service Partition (HPSP). If the
# size of any partition is different the sizes below need to be
# changed.
PARTS1=${DISK1#/dev/dsk/}
PARTS2=${DISK2#/dev/dsk/}
PART1=$(echo $PARTS1|cut -c 0-6)
PART2=$(echo $PARTS2|cut -c 0-6)
PARTS2=${PART2}
if [ $CPU = IA ]
then
PARTS2=${PART2}s2
# Let figure out the partition sizes on DISK and use those
# on DISK2.
hpspsize=\"ibase=16;$(echo ${HPSPE#0[xX]}\
|tr \\"\"[abcdef]\"\\" \\"\"[ABCDEF]\"\\")-\
$(echo ${HPSPS#0[xX]}|tr \\"\"[abcdef]\"\\"
\\"\"[ABCDEF]\"\\")+1\"
HPSPsize=$(echo $hpspsize |bc)
HPSPSIZE=$(echo $HPSPsize\/2\/1024|bc)
12
print \"3\nEFI ${EFISIZE}MB\nHPUX 100%\nHPSP ${HPSPSIZE}MB\" >\
/tmp/partitionfile
echo \"\n\n Partition file has been create .... Displaying \n\n\"
cat /tmp/partitionfile
fi
pvcreate -f -B /dev/rdsk/${PARTS2}
13
# Copy the boot area to the disk. Note that mkboot is done to
# the whole disk for bot IA and PA but the command is not
# the same so .......
if [ $CPU = IA ]
then
else
# Lets do the PA Dance
mkboot /dev/rdsk/${PARTS2}
mkboot -a \"hpux -lq\" /dev/rdsk/${PART1}
mkboot -a \"hpux -lq\" /dev/rdsk/${PARTS2}
fi
lvlnboot -R
"
}
Important:
While HP has tested the above config.local file on some
systems and configurations, it has not been tested in every possible
situation and configuration. HP recommends that hat you test it and
ensure that it works correctly in your environment before relying on it in
a production situation.
14
Glossary
EFI Extensible Firmware Interface is the firmware interface for HP Integrity systems. It is the name of
the first partition on a HP-UX boot disk.
HPSP HP Service Partition, which contains the Offline Diagnostics on HP Integrity systems.
LIF Logical Interchange Format.
The following Web site contains useful information relevant to the ideas presented in this white
paper:
HP Partitioning Continuum for HP-UX11i
15
© Copyright 2006, 2007 Hewlett-Packard Development Company, L.P.
Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation,
and Technical Data for Commercial Items are licensed to the U.S.
Government under vendor's standard commercial license.
The information contained herein is subject to change without notice.
The only warranties for HP products and services are set forth in the
express warranty statements accompanying such products and services.
Nothing herein should be construed as constituting an additional
warranty. HP shall not be liable for technical or editorial errors or
omissions contained herein.
Intel Itanium® Logo, Intel, Intel Inside and Itanium are trademarks or
registered trademarks of Intel Corporation in the US and other countries
and are used under license.
Intel® Itanium® Processor Family is a trademark of Intel Corporation in
the US and other countries and is used under license
MPN 5992-2900, 9/2007
16