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:
Fixed NFS mounts with different mount point paths on different machines. An example is the mounting of home directories under /usr/people on one host and under /usr/users on another host.
Symbolic links from outside into a network-available file system
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:
Only an administrator should modify the global file.
Both path-aliasing files share the same format:
Blank lines and lines that begin with a # sign are skipped.
Each line, other than a blank line or a line preceded by #, must contain four strings separated by any number of blanks or tabs.
The first string specifies a source path, the second a submit host, the third an execution host, and the fourth the source path replacement.
Both the submit host and the execution host strings can be an * (asterisk), which matches any host.
The files are interpreted as follows:
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.
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.
After both files are read, the stored path-aliasing information is passed to the execution host along with the submitted job.
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.
# cluster global path aliases file # src-path subm-host exec-host dest-path /tmp_mnt/ * * /