Sun N1 Grid Engine 6.1 Administration Guide

Using Path Aliasing

In Solaris and in other networked UNIX environments, users often have the same home directory, or part of it, on different machines. For example, the directory might be made accessible across NFS. However, sometimes the home directory path is not exactly the same on all machines.

For example, consider user home directories that are available across NFS and automounter. A user might have a home directory /home/foo on the NFS server. This home directory is accessible under this path on all properly installed NFS clients that are running automounter. However, /home/foo on a client is just a symbolic link to /tmp_mnt/home/foo. /tmp_mnt/home/foo is the actual location on the NFS server from where automounter physically mounts the directory.

A user on a client host might use the qsub -cwd command to submit a job from somewhere within the home directory tree. The -cwd flag requires the job to be run in the current working directory. However, if the execution host is the NFS server, the grid engine system might not be able to locate the current working directory on that host. The reason is that the current working directory on the submit host is /tmp_mnt/home/foo, which is the physical location on the submit host. This path is passed to the execution host. However, if the execution host is the NFS server, the path cannot be resolved, because its physical home directory path is /home/foo, not /tmp_mnt/home/foo.

Other occasions that can cause similar problems are the following:

To prevent such problems, grid engine software enables both the administrator and the user to configure a path aliasing file. The locations of two such files are as follows:

Format of Path-Aliasing Files

Both path-aliasing files share the same format:

How Path-Aliasing Files Are Interpreted

    The files are interpreted as follows:

  1. After qsub retrieves the physical current working directory path, the global path-aliasing file is read, if present. The user path-aliasing file is read afterwards, as if the user path-aliasing file were appended to the global file.

  2. Lines not to be skipped are read from the top of the file, one by one. The translations specified by those lines are stored, if necessary.

    A translation is stored only if both of the following conditions are true:

    • The submit host string matches the host on which the qsub command is run.

    • The source path forms the initial part either of the current working directory or of the source path replacements already stored.

  3. After both files are read, the stored path-aliasing information is passed to the execution host along with the submitted job.

  4. On the execution host, the path-aliasing information is evaluated. The source path replacement replaces the leading part of the current working directory if the execution host string matches the execution host. In this case, the current working directory string is changed. To be applied, subsequent path aliases must match the replaced working directory path.

Example 4–1 is an example how the NFS automounter problem described earlier can be resolved with an aliases file entry.

Example 4–1 Example of Path-Aliasing File

# cluster global path aliases file
# src-path  subm-host   exec-host   dest-path
/tmp_mnt/   *           *           /