Running the disaster recovery scripts
During a disaster recovery event, when the logical partitions (LPARs) move from the active site to the backup site, the IP addresses, subnet, and other network-related attributes stay the same. If you want the backup environment to be different than the source environment for the LPARs, you can use the disaster recovery scripts that collect the information from the source and backup LPARs and reconfigures the recovered LPAR to match the system name, adapter configuration, network parameters, volume group information, and clustering configuration in its collected information.
The disaster recovery scripts are custom scripts that are available in the KSYS package. Run these scripts in the virtual machines to collect required information about the source LPAR and backup LPAR and to use the collected information to re-create or import the environment for the recovered LPAR.
Consider the following prerequisites before you use the disaster recovery scripts:
- The data_collection.ksh script must be run successfully on every LPAR in the source site.
- site_specific_ip_config.cfg and failover_config.cfg must be manually edited to add system configuration information for source and backup LPARs.
- For AIX LPARs, the ghostdev parameter must be enabled.
- All of the cluster LPARs must be running and must have network capability.
The disaster recovery scripts and sample files are described in the following table:
| Disaster recovery scripts or files | Description |
|---|---|
| data_collection.ksh | Collects the following information about the source environment:
Note: This script must be installed on the source LPAR in the
/usr/local/bin directory. The data_collection.ksh script
must be run on the source LPARs regularly.
The data_collection.ksh script collects system information and places it in the following locations:
|
| setup_dr.ksh | Reconfigures the environment of the backup LPAR to be the same as specified in
site_specfic_ip_config.cfg. If site_specific_ip_config.cfg does not exist,
failover_config.cfg is used instead. Note: All scripts must be installed
in the /usr/local/bin/ directory of the source LPARs so that these scripts are
also available in the backup LPARs during a disaster. You must run this script on the backup LPAR
during a disaster recovery event.
Consider the following prerequisites before you run this script:
The setup_dr.ksh script calls other scripts automatically to perform the following tasks:
|
site_specific_ip_config.cfg / failover_config.cfg |
Contains sample configuration files for information about the source and backup LPARs. You must
manually edit these files and fill appropriate information about the AIX operating system
configuration in the source and backup LPARs that are listed as follows:
Note: The updated failover_config.cfg and
site_specific_ip_config.cfg files must be placed in the
/usr/local/bin directory of the source LPAR.
|
After you complete the initial configuration on the source LPAR, complete the following steps:
- Copy the script and sample files from the following location in the KSYS
node:
/opt/IBM/ksys/samples/ - Install these script files in the following location of the source
LPARs:
/usr/local/bin/ - Edit the site_specific_ip_config.cfg and failover_config.cfg configuration files with the appropriate LPAR information and place them in the /usr/local/bin directory.
- Run the data_collection.ksh script regularly to collect the environment
information. You can set your LPARs to run this script daily by using the AIX
cronutility. For example, you can add the following line as acrontabentry to run this script daily at 1 AM:00 01 * * * /usr/local/bin/data_collection
When you move the source LPARs to the backup site during a disaster event, you can use the disaster recovery scripts to retain the environment of the backup LPARs. The procedure to run the disaster recovery steps in the backup site assumes that the following prerequisites are met:
- All the disaster recovery scripts are installed on the source LPARs.
- The data_collection.ksh script is successfully run on the source LPARs.
- The site_specific_ip_config.cfg and failover_config.cfg configuration files are updated with the appropriate host name, IP address, netmask, and name server for the source and backup LPARs.
- The disk replication and split operations copied all of the source data to the backup site.
- The disk storage is available to the appropriate LPAR on the backup site.
- A disaster occurred, and the source LPARs are moved to the backup LPARs.
- The appropriate root passwords are acquired for the backup LPARs.
- The appropriate DNS server is available at the backup location.
- The backup LPARs are identified and are accessible through the HMC.
To run the disaster recovery scripts in the backup LPARs, complete the following steps:
- To check the /usr/local/dr/data directory for date and time stamps, run the
following command:
Verify whether the replication was complete.ls -la /usr/local/dr/data - If the console messages are large, route the output to a file by running the following command:
swcons /tmp/console.log - Run the setup_dr.ksh script to reconfigure the backup LPAR host name, network
IP addresses, and HBAs, and to import the volume groups.Note: The LPARs must be completely recovered by now.
- Verify the LPAR configuration to confirm the changes by completing the following checks:
- Run the hostname command to verify the LPAR host name.
- Run the ifconfig -a command to verify the LPAR IP address.
- Run the df or mount command to verify that all local file systems are mounted. Mount any unmounted file systems by using the mount command, if required.
- Run the lsps -a command to display all paging spaces and their status. For
unavailable paging spaces, run the swapon command with the appropriate paging
space to set the paging space to the active state.
For more information about the disaster recovery scripts, see Site-specific IP configurations in IBM Recovery Manager DR.