Creating an Ignite-UX server package for Serviceguard

Hy, here is a good doc a person emaild-me:

The following implementation shows how one might set up a highly available
Ignite server.

1) Load Serviceguard, the HA-NFS toolkit and Ignite-UX on servers that will
participate in the cluster.

2) Reserve a relocatable IP and alias it to a name such as "ignite" for the
Ignite package. Insure the hostname resolution service (/etc/hosts or
DNS) resolve the IP to the alias name.

3.1) Create a volume group and file system where the Ignite "boot" and
"recover" images will be placed.

On the first node:
# mkdir /dev/vgignite

Select an unused minor number which is available across nodes (required
for NFS-mounted file systems):
# mknod /dev/vgignite/group c 64 0xNN0000
(where NN = the unused minor number)
# vgcreate /dev/vgignite /dev/dsk/
# vgchange -a y /dev/vgignite
# lvcreate /dev/vgignite

3.2) Create a map file for that volume group and import that volume group
into the intended adoptive node so that it too may serve the images when
called upon.

On the first node:
# vgexport -pvs -m /etc/lvmconf/map.vgignite /dev/vgignite

Copy it to the other node(s):
# rcp /etc/lvmconf/map.vgignite <2ndNODE>:/etc/lvmconf/
NOTE: .rhosts and inetd: rcmds must be enabled.

On the second node:
# mkdir /dev/vgignite
# mknod /dev/vgignite/group c 64 0xNN0000
(where NN = the SAME unique minor number used on 1st node - NFS!)
# vgimport -vs -m /etc/lvmconf/map.vgignite /dev/vgignite

4.1) Create a Serviceguard package for the Ignite server function. Example:
# cd /etc/cmcluster/
# mkdir ignite
# cd ignite
# cmmakepkg -p ignite.config
# cmmakepkg -s ignite.sh

4.2) Copy the HA-NFS files to the package directory.
# cp /opt/cmcluster/nfs/hanfs.sh . # Note "dot" at the end
# cp /opt/cmcluster/nfs/nfs_xmnt . # Note "dot" at the end

4.3) Edit the package configuration file.
Sample modifications to ignite.config:
NODE_NAME eon
NODE_NAME ion
RUN_SCRIPT /etc/cmcluster/ignite/ignite.sh
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT /etc/cmcluster/ignite/ignite.sh
HALT_SCRIPT_TIMEOUT NO_TIMEOUT
SERVICE_NAME nfs.monitor
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
SUBNET 16.113.0.0

4.4) Edit the package control script:
Sample modifications to ignite.sh:
VG[0]="vg03"
LV[0]="/dev/vg03/lvol1"; FS[0]="/ignite"; FS_MOUNT_OPT[0]="-o largefiles"
FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]=""
FS_TYPE[0]="vxfs"
IP[0]="16.113.10.0" # RELOCATABLE IP
SUBNET[0]="16.113.0.0"

The latest version of the package control script, created using
cmmakepkg, automatically runs hanfs.sh if the file exists in the
package directory. The hanfs.sh script insures the NFS daemons are
operating and then exports file systems.

4.5) Edit the hanfs.sh control script:
Sample modifications to hanfs.sh:
XFS[0]="-o root=eon:ion:igniter /ignite" # access not limited to any
client
NFS_SERVICE_NAME[0]="nfs.monitor"
NFS_SERVICE_CMD[0]="/etc/cmcluster/nfs/nfs.mon"
NFS_SERVICE_RESTART[0]="-r 1"

Since the Ignite file system will be mounted on the server where the
package is operating, it is not necessary to make HA-NFS perform a
cross-mount of the local file system. This is because the NFS mount
takes place against the relocatable IP's alias, NOT against a
particular server.

5) Create the local mount directory for the Ignite images. Example:
# mkdir /ignite/

6) Copy these files to the other node. Example:
# rcp -pr /etc/cmcluster/ignite <2ndnode>:/etc/cmcluster

7) Add the package to the cluster. Example:
# cmapplyconf -P ignite.config

Start up the Ignite package. This will activate the volume group and
mount the image-serving file system, as well as the awaken the relocatable
IP on the server.
If another server has been given mount ability of the NFS file system, use
this example form of the mount command:

OTHERNODE: # mount igniter:/ignite /ignite
NOTE: "igniter" is the relocatable IP alias in this example. Since the
file system moves with the package, take advantage of the relocatable IP
alias to locate the Ignite file system.

Example operation:
# cmviewcl -p ignite
PACKAGE STATUS STATE AUTO_RUN NODE
ignite up running enabled eon

On the node where the Ignite file system is mounted, we see:
# bdf | grep ignite
/dev/vg03/lvol1 3932160 2065 3684470 0% /ignite

# netstat -in
Name Mtu Network Address Ipkts Opkts
lan0:1 1500 16.113.0.0 16.113.10.0 164271 116
... ^^^^^^^^^^^ relocatable IP

# netstat -r | grep igniter
igniter igniter UH 0 116 lan0:1 4136
16.113.0.0 igniter U 3 0 lan0:1 1500

8) Perform this step on both nodes.
Using the Ignite-UX instl_adm command, redirect the Ignite server
to use the relocatable IP assigned to a NIC when the package starts. Use
this procedure:

a) Use instl_adm to create a file containing the Ignite-UX server IP:
# instl_adm > /tmp/file

Note this line at the top of the file:
server=""

Example:
# cat /tmp/file
# instl_adm defaults:
# NOTE: Manual additions between the lines containing "instl_adm defaults"
# and "end instl_adm defaults" will not be preserved.
server="16.113.10.0"
netmask[]="255.255.192.0"
route_gateway[0]="16.113.0.1"
route_destination[0]="default"
# end instl_adm defaults.

b) Edit /tmp/file, changing the server IP to that of the relocatable IP.

c) Make Ignite load the new IP to serve to clients:
# instl_adm -f /tmp/file

9) Create Ignite images:
There are a couple of ways to create a network recovery image. One way is
to use the Ignite GUI on the server. If the client does not already exist
on the server, click on "Actions --> Add New Client". This will
install the Ignite recovery commands onto the client.

Then select "Actions --> Create Network Recovery Archive". This
will pop up several windows requesting where to put the archive, how many
archives to save and other questions.

Enter the relocatable IP and archive filesystem in these
windows and /var/opt/ignite/clients/<0xLLA>/recovery/defaults
(LLA = Link Level Address (MAC address) of the client)
will be created for this client. Ignite will then use that information as
the default whenever the GUI is used to create another archive for this
client.

The other way to create the network recovery archive is by running the
make_net_recovery command manually from the client. Once the
recovery tools are installed onto the client by the server, (Actions-->
Add new client), the user can log onto the client and run
make_net_recovery manually. Example:

# /opt/ignite/bin/make_net_recovery -x inc_entire=vg00 \
-a 16.113.10.0:/ignite -s flipsg2

... where /ignite is the repository directory for images,
and flipsg2 is the relocatable IP's alias.

This will create an image of vg00 and set the relocatable IP as the
nfs_source in the archive configuration file.

Note that the client must have root/write permissions to save an image to
the Ignite server. Update this line in the hanfs.sh script on each node:

XFS[0]="-o root=eon:ion:igniter /ignite"