HP-UX Virtual Partitions

   

HP-UX Virtual Partitions

By Marty Poniatowski

Table of Contents
Chapter 10.  Ignite-UX

The following section contains the make_net_recovery manual page.

make_net_recovery

make_net_recovery - Create an Ignite-UX system recovery archive.

make_net_recovery(1M) NAME make_net_recovery - network based system recovery archive creation SYNOPSIS /opt/ignite/bin/make_net_recovery -s Ignite-UX_server [-v] [-P partial_inclusion_indicator] [-i|-ib] [-a archive_server:archive_dir] [-d description] [-f content_file] [-l lanic_id] [-n num_archives] [-x content-options] [XToolkit- Options] DESCRIPTION The make_net_recovery tool creates a system recovery archive and stores the archive on the network. The archive created by make_net_recovery is specific to the system it was created for and its identity includes hostname, ip_address, networking information, etc. In the event of a root disk failure, the recovery archive can be installed via Ignite-UX to restore the system. The contents of the system recovery archive will always include all files and directories which are considered essential to bringing up a functional system. This "essential" list is pre-defined by make_net_recovery. By running make_net_recovery in interactive mode, the directories and files which make up the "essential list" can be displayed. In addition to the essential list, data can be included in the archive on a disk/volume group, file, or directory basis. Non- essential files and directories can also be excluded. Options make_net_recovery recognizes the following options: -a archive_server:archive_dir Specifies the NFS server and location to store the archive. The archive directory must be NFS exported (See section "Exporting Archive Directory") and sufficient disk space is required. The default is the hostname of the Ignite-UX server followed by the directory which holds the archive. e.g., Serverhost:/var/opt/ignite/recovery/archives/<hostname>. The hostname is the name of the system being archived. Each make_net_recovery client will create a subdirectory named after the client hostname under the specified directory to store the archives. -b When used in combination with the -i option, it causes make_net_recovery to run in the background after the interactive user interface completes. -d description One line description of the system recovery archive. Quotation marks must be enclosed around the description if spaces are included in the description. This description will be displayed when choosing the archive as a configuration from the Ignite-UX Graphical User Interface. The default description is Recovery Archive. -f content_file Location of the file which identifies keywords to specify inclusions and exclusions for the archive. Default is /var/opt/ignite/clients/0x{LLA}/recovery/archive_content This file is located on the Ignite-UX server and accessed by the client through an NFS mount. The absolute path name to the archive_content file must be supplied as an argument to the -f option. This option may be useful when there is a desire to manage multiple files which specify the content of the archive. The -f option is not allowed when using the -x options to specify the contents of the archive. -i Causes make_net_recovery to run interactively to allow you to select which files and directories are to be included in the recovery archive. It is preferable to use the ignite GUI command on the Ignite-UX server when running an interactive make_net_recovery session. Running it from ignite causes any additional server configuration of NFS mounts to be performed. It also gives you a better progress report. -l lanic id The lanic id of the system being archived. Used to create the per-client directory on the Ignite-UX server. -n num_archives Specifies the number of archives that should remain on the server at any given time. The default is 2. If num_archives=2 and there are already 2 archives present when a 3rd is being created, make_net_recovery will remove the oldest archive after successfully creating the 3rd archive. -P s|w|e When a disk or volume group is partially included in the system recovery archive, generate an ERROR(e), WARNING(w), or SUPPRESS(s) any warning messages that would normally be generated when partial inclusions occur. The default is w, thus causing Warning messages to be produced when partial inclusions of disks and/or volume groups are detected. When e is specified, an Error message will be displayed to stdout and to the logfile, and execution of make_net_recovery will stop once the Error message is displayed. -s Ignite-UX_server Specifies the hostname of the Ignite-UX server. The configuration files, defaults and contents files for the client system will be read from the Ignite-UX server in /var/opt/ignite/clients/0x{LLA}/recovery. The make_net_recovery tool will NFS mount the per-client directory to access this information. -v Display verbose progress messages while creating the system recovery archive. Includes information such as which volume groups/disks will be included in the system recovery archive. -x include=file|dir Includes the file or directory in the recovery archive but does not cross any mount points. -x inc_cross=file|dir Includes the file or directory in the recovery archive and crosses mount points to access any directories that are mounted or files contained in directories that are mounted. -x inc_entire=/dev/dsk/<name>|vg_name Includes all file systems contained on the specified disk or volume group. Use a block device file of the format /dev/dsk/<name> when specifying a whole-disk (non-LVM) file system. Use the volume group name (such as vg00) when you want all file systems that are part of that LVM volume group to be included in the archive. -x exclude=file|dir Excludes the file or directory from the archive. When a directory is specified, no files beneath that directory will be stored in the archive. XToolkit-Options The make_net_recovery command supports a subset of the standard X Toolkit options to control the appearance of the GUI when the -i option is specified. The supported options are: -bg, -background, -fg, -foreground, -display, -name, -xrm, and -synchronous. See the X(1) manual page for a definition of these options. Including and Excluding From Archive The contents of the archive can be controlled from the contents file. The full path for the contents file is /var/opt/ignite/clients/0x{LLA}/recovery/archive_content on the Ignite-UX Server. This file consists of keyword identifiers which specify the inclusion of files, directories, or entire disks and volume groups. The keyword identifiers also instruct make_net_recovery whether to follow mount points when creating the system recovery archive. The contents file has the following keywords identifiers: include <filename | directory> Includes the specified filename or directory and all subdirectories and associated files. Mount points are not crossed and symbolic links are not followed. inc_cross <filename | directory > Include the specified filename or directory and all subdirectories and files contained underneath subdirectories. Local mount points are crossed but symbolic links are not followed. inc_entire <volume group | disk > Include the entire specified volume group (e.g. "vg00") or disk (block device - e.g. "/dev/dsk/c0t5d0"). Do not specify a disk if it is part of a volume group. exclude <filename | directory > Exclude the specified filename or directory and all subdirectories and files contained under the subdirectories. make_net_recovery reads the contents file to generate the list of files that will be used to create the system recovery archive. The contents file can be modified by hand or by running make_net_recovery in interactive mode. When modifying the contents file, keep the following points in mind: + No essential file or directory can be excluded. Exclusions of essential files or directories will be ignored. + Exclusions take precedence over inclusions. Anything that is both included and excluded will be excluded from the archive. + The ordering of inclusions and exclusions within the defaults file is not significant. Using Settings From Previous Archive Creation The defaults file stores input specified by interacting with the make_net_recovery GUI. Options are preserved until the next archive is generated by interacting with the GUI. Command line options will override settings in the defaults file. The full path for the defaults file is /var/opt/ignite/clients/0x{LLA}/recovery/defaults on the Ignite-UX server. This directory is accessed via NFS from the client. ###### defaults file ###### RECOVERY_LOCATION=15.1.2.3:/var/opt/ignite/recovery/archives/{client_name} RECOVERY_DESCRIPTION="Recovery Archive" SAVE_NUM_ARCHIVES=2 Using the Recovery Archive To recover a failed system using the network recovery archive: + If the client system is being replaced, or the LAN card has changed since make_net_recovery was last used, you should manually rename the old client directory prior to starting the recovery. Not doing so will cause a new directory to be created and you will not see the recovery archives created under the old client directory. To rename the client directory, obtain the new LLA address (you may use the LanAddress boot-ROM command in the information menu), then use the mv command. For example: cd /var/opt/ignite/clients mv 0x00108305463A 0x0060B0C43AB7 If you have already booted the new system, you will need to remove the new client before renaming the old directory. Be careful not to remove the old directory containing the recovery information. + Boot the system using either a network boot, a tape created using make_boot_tape, or using the bootsys command if the system is still running. + Do not interact with ISL + Select: [ Install HP-UX ] + From the Ignite-UX GUI: select the icon for the client + Choose "Install/New Install" + Select the recovery configuration to use Exporting Archive Directory The directory used to store the archives must be exported from the archive server to each client. Exporting the archive directory from the system where the archive will be stored enables make_net_recovery to create and access the archive via NFS. The archive server by default is the Ignite-UX server but can be changed using the -a option to be a different remote server, or even the local client if you want to capture the archives as part of the client's regular backup. Note however, that if the archives are stored on the client itself, they must be put onto a remote server if the client ever needs to be recovered using them. For security reasons, it is best to export each client-specific archive directory to just the individual client. If the recovery archive creation is initiated from the ignite graphical user interface on the Ignite-UX server, and the archive server is the same as the Ignite-UX server, the /etc/exports file will be edited automatically so the archive can be stored in the desired location. Otherwise, if make_net_recovery is run directly on the client the following steps are required to be done on the archive server. + On the archive server, create a directory for each client to hold the archive of the client's files. It is important that the directory be owned by the user "bin". Replace <client> in the commands below with the hostname of the client. If you use the -a option to make_net_recovery to specify an alternate location or the archives, you will need to use that path instead of the default which is shown below. mkdir -p /var/opt/ignite/recovery/archives/<client> chown bin:bin /var/opt/ignite/recovery/archives/<client> + Edit /etc/exports to add an entry for each client. Replace <client> with the client's hostname in the example shown: /var/opt/ignite/recovery/archives/<client> -anon=2,access =<client> + Run the exportfs command to have the edits to the exports file take effect: /usr/sbin/exportfs -av Networking Features Two NFS mount points are established on the client by make_net_recovery. The /var/opt/ignite/clients directory on the Ignite-UX server is mounted to the client system to store configuration files which describe the client configuration and location of the recovery archive. The second mount point is made to the archive_server:archive_dir (see the -a option) and is used to store the recovery archive of the client system. After successful or unsuccessful completion of the system recovery archive, the NFS mount points are un-mounted. The NFS mount for the archive directory may be exported on a per- client bases. A separate archive directory is used for each client. This allows you to NFS export each directory only to the individual client owning the archive, which provides security. If the client system does not have the most recent versions of Ignite-UX tools, The Ignite-UX GUI uses swinstall(1M) to install the "recovery package" which includes all necessary files to perform the recovery. RETURN VALUE make_net_recovery will return 0 upon successful completion. When warnings occur, 2 will be returned. Otherwise, when a failure occurs 1 will be returned. EXAMPLES Create a system recovery archive by interacting with the Ignite-UX GUI from the Ignite-UX server: export DISPLAY=<hostname>:0 ignite Create a system recovery archive from the client, using settings from the last invocation of the Ignite-UX GUI. Use the options file on the Ignite-UX server (myserver) in the default location: /var/opt/ignite/clients/0x{LLA}/recovery. make_net_recovery -s myserver Create a system recovery archive that includes files from all file systems in the vg00 volume group: make_net_recovery -s myserver -x inc_entire=vg00 Create a system recovery archive that includes all of the vg00 and vg01 volume groups, but that excludes the /depots directory. make_net_recovery -s myserver -x inc_entire=vg00 -x inc_entire=vg01 -x exclude=/depots Below is an example shell script that can be run on each client.It can help you to keep from ever having to update Ignite-UX on each client when a new release is loaded on the server. It will automatically update the network recovery software if the server has a newer version. It may be suitable for use in a crontab entry. This example assumes that the /var/opt/ignite/depots/recovery_cmds software depot has been created. This depot is created by running ignite GUI at least once to make a recovery archive of a system (See also pkg_rec_depot(1M)). Once created, this depot will automatically be updated each time Ignite-UX is updated on the server. myserver=iuxserver /opt/ignite/lbin/check_version -s $myserver if [ $? != 0 ] then swinstall -s $myserver:/var/opt/ignite/depots/recovery_cmds '*' fi /opt/ignite/bin/make_net_recovery -s $myserver WARNINGS Disks Will be Reformatted If any file from a disk or volume group is included in the recovery archive, that disk (or all disks in the volume group) will be reformatted during the recovery, and only the files included will be recovered. Any files that were not included in the archive, will have to be restored from your normal backups. Disks and volume groups that did not have any files included in the archive are not reformatted during a recovery and are re-imported and re-mounted at the end of the recovery. Logical Volume Physical Extent Allocation Not Preserved: The make_net_recovery tool captures enough information from the system so that during a recovery it can reconstruct most all visible aspects of the prior LVM configuration. This includes logical volume and volume group names, attributes, and even minor number values. The tool also ensures that the new logical volumes reside on the same disks within the volume group as they did before. make_net_recovery does not, however, ensure that logical volumes are extended in the same exact order as they were originally. This means the LVM physical extents allocated to a logical volume may be in a different location on the disk than before. The recovery tools use a very specific and complex algorithm for extending logical volumes to ensure success (such as extending contiguous volumes before non- contiguous). An example effect of this is that swap/dump volumes will reside on the root disk ahead of some other volumes even though that may not have been the original layout. VxVM disk groups not included in The disk groups managed by VERITAS Volume Manager (VxVM) cannot be included in the Ignite-UX archive. If they are included, make_net_recovery will error out. Those disk groups will be left undisturbed and re-integrated to the system after the recovery is complete. LVM Disk Mirrors not Restored The make_net_recovery tool will create a recovery backup for a system with mirrored disks but it will not restore the mirrored disk configuration. If the system is later recovered, previously mirrored volumes will no longer be mirrored. They can be manually re-mirrored after the system is up. Using the config.local file in the clients directory, you can specify the LVM commands to restore mirrored disks to be executed automatically after the system has been restored. For more details, see the white paper /opt/ignite/share/doc/diskmirror.pdf. DEPENDENCIES The Ignite-UX GUI must be run from the Ignite-UX Server, see ignite(5). make_net_recovery depends on several other Ignite-UX tools. When running the Ignite-UX server GUI, Ignite-UX checks whether the client system, that make_net_recovery runs on, has the same versions of Ignite-UX tools. If running make_net_recovery from the command line without ever interacting with the Ignite-UX GUI, commands will need to be installed using swinstall(1M) from the Ignite-UX server to the client system that make_net_recovery will run on. AUTHOR Ignite-UX and make_net_recovery were developed by the Hewlett-Packard company. DIAGNOSTICS All major steps within network recovery are logged on the server and displayed via the Ignite-UX Server GUI. FILES /opt/ignite/recovery/mnr_essentials Lists the files and directories that are considered essential and are always included in the archive if they exist on the system. /var/opt/ignite/recovery/mnr_essentials Lists the files and directories that are essentials, but actsas the user modifiable version, so that the original mnr_essentials file can be maintained. When this file exists, its content is checked before the file /opt/ignite/recovery/mnr_essentials. /var/opt/ignite/clients/0x{LLA}/CINDEX This file contains a list of Ignite-UX configurations that are specific to the particular client with a network LAN link address (LLA) as shown in the path. This file supplies Ignite-UX with the config files created by make_net_recovery and provides a list of client-specific selections a user can pick from during a system recovery. /var/opt/ignite/clients/0x{LLA}/recovery The per-clients recovery directory. It holds the client's recovery configuration files as described below. /var/opt/ignite/clients/0x{LLA}/recovery/defaults Supplies the default options to make_net_recovery. Created by the ignite GUI. /var/opt/ignite/clients/0x{LLA}/recovery/archive_content Supplies files and directories to be included or excluded. Using the -x command line arguments will cause this file to be ignored. /var/opt/ignite/clients/0x{LLA}/recovery/client_status File used to communicate the status of the make_net_recovery command back to the ignite GUI running on the Ignite-UX server. /var/opt/ignite/clients/0x{LLA}/recovery/latest A symlink to the <date,time> directory containing the newest set of recovery files as described below. /var/opt/ignite/clients/0x{LLA}/recovery/<date,time> Directory containing files pertaining to the make_net_recovery command that was run at the date and time indicated in the directory name. An example path looks like: /var/opt/ignite/clients/0x080009123456/1999-12-20,13:50 /var/opt/ignite/clients/0x{LLA}/recovery/<date,time>/system_cfg Configuration file which describes the file system and networking configuration of the system (generated by the save_config(1M) command). /var/opt/ignite/clients/0x{LLA}/recovery/<date,time>/archive_cfg Configuration file which supplies the location and access method to the archive containing the files to be restored. /var/opt/ignite/clients/0x{LLA}/recovery/<date,time>/control_cfg Configuration file which supplies control parameters and the command scripts to import volume groups that will be preserved and not created during the recovery. /var/opt/ignite/clients/0x{LLA}/recovery/config.local An optional config file that the user may create to add configuration information to be used during the recovery of the client. For example, you may want to add to this file a post_config_cmd to re-mirror disks that the recovery process un- mirrored. (See the document: /opt/ignite/share/doc/diskmirror.pdf for an example). Once this file is created, make_net_recovery will automatically add it to any new configurations that it adds to the CINDEX file. /var/opt/ignite/clients/0x{LLA}/recovery/<date,time>/recovery.log Default logfile location for make_net_recovery. /var/opt/ignite/clients/0x{LLA}/recovery/<date,time>/manifest Software and Hardware manifest information installed and configured for the system at the time the archive was created (See print_manifest(1M)). /var/opt/ignite/recovery/archives/<hostname> The default location on the Ignite-UX server for the client to store the recovery archive. The <hostname> directory must be NFS exported to the individual client with the matching hostname. SEE ALSO ignite(5), instl_adm(4), make_medialif(1M), make_boot_tape(1M), manage_index(1M), pkg_rec_depot(1M), save_config(1M), swinstall(1M).


       
    Top
     

    Категории