Migrate /etc and /var system control files

Description

The /etc and /var directories contain system control files. The /etc directory contains customization data that you maintain and the /var directory contains customization data that IBM® maintains.

The following elements and features use /etc:
The following elements and features use /var:

During installation, subdirectories of /etc and /var are created. If you install z/OS using ServerPac, some files are loaded into /etc and /var because of the customization performed in ServerPac.You have to merge the files in /etc and /var with those on your previous system. If you install z/OS® using CBPDO, you should copy the files from your old system to the z/OS V2R2 /etc and /var subdirectories.

After merging or copying the contents of /etc and /var, you have to inspect and modify the files as necessary to reflect z/OS V2R2 requirements.

Table 1 provides more details about this migration action. Use this information to plan your changes to the system.

Table 1. Information about this migration action
Element or feature: Multiple.
When change was introduced: General migration action not tied to a specific release.
Applies to migration from: z/OS V2R1 and z/OS V1R13.
Timing: Before the first IPL of z/OS V2R2.
Is the migration action required? Yes.
Target system hardware requirements: None.
Target system software requirements: None.
Other system (coexistence or fallback) requirements: None.
Restrictions: None.
System impacts: None.
Related IBM Health Checker for z/OS check: None.

Steps to take

Copy files from your old system to the z/OS V2R2 /etc and /var subdirectories, and then modify the files as required for z/OS V2R2. If you have other files under your existing /var directory, you must merge the old and new files under /var. The easiest way to do this is to create a clone of your current /var file system and then copy the new /var files into the clone.

Many z/OS UNIX utilities are available for comparing and copying directory structures and files. Two that are especially helpful for /etc and /var migration work are:
  • diff (with the -r option, for recursion). This utility is very useful for comparing the path structures and file contents, and has many options available. The dircmp utility has fewer options for directory comparisons, and the cmp utility stops after the first difference in a file comparison and has output that is more cumbersome.
  • pax. The -rw option works like a copy (instead of making or extracting from a single file archive) for directories, symbolic links, and files. Consider the -pe option for saving the attributes when doing the copy. The -k option prevents overwriting of existing files. The –C option causes pax to continue after encountering an error on the source file system. That is, pax prints an error message and returns a nonzero value after the command ends. Errors on the target file system (such as out of space or write errors) still cause the pax command to end as it always has.
To determine what you need to migrate, first compare the ServerPac /etc and /var file systems with your existing /etc and /var file systems. Mount a copy of your existing /etc and /var file systems to a location outside of the ServerPac file system. For instance, you might have your ServerPac file systems at /ServerPac/zOS_Rx/etc and /ServerPac/zOS_Rx/var, and your existing file systems at /Service/ImageX/etc and /Service/ImageX/var. You might have several file systems to mount that are copies of each of your image's /etc and /var file systems (ImageX, ImageY, and ImageZ, for instance). To compare the ServerPac and existing system's /etc and /var, you can run two z/OS UNIX commands, such as:
diff  -r  /ServerPac/zOS_Rx/etc  /Service/ImageX/etc
diff  -r  /ServerPac/zOS_Rx/var  /Service/ImageX/var
These command results will give you a list of the changes that your existing system's /etc and /var file systems are missing—both the structure differences and the file content differences.
After you determine which directories, symbolic links, and files you are missing from your existing system, you can use one of several ways to propagate the ServerPac information forward:
  • You could use the pax command (with the -k option) to copy from the ServerPac /etc and /var file systems to each of your existing system's /etc and /var file systems. For example:
    cd /ServerPac/zOS_Rx/etc
    pax -rvwkC -pe * /Service/ImageX/etc
    Another example:
    cd /ServerPac/zOS_Rx/var
    pax -rvwkC -pe * /Service/ImageX/var
    The pax command is a good choice because it copies all files, directories, and symbolic links for each file system from the ServerPac system using a single command without overlaying any existing files.
  • You could rerun the product-supplied MKDIR jobs to recreate the directories and symbolic links on each of your existing system's /etc and /var file systems. (A list of the MKDIR jobs is found in z/OS Program Directory and the other program directories for the products that were in your ServerPac order.) MKDIR jobs are designed to be run multiple times without damaging your existing file system. For the files under /var/ocsf, rerun the OCSF-supplied ocsf_install_crypto installation script. Or, you can combine these jobs and script them into a single batch job to make the execution more consolidated and repeatable.

After you have made the changes to a copy of your existing image's /etc and /var file systems, you can unmount them and use them for your deployment of the ServerPac system, as your schedule indicates. Remember, you are using copies of your existing /etc and /var file systems, and you are preserving what you had previously by modifying copies, so your customization for those specific existing images is not lost.

Reference information

For more information, see z/OS Program Directory at the z/OS installation related information website.