Operating System - OpenVMS
1828808 Members
2344 Online
109985 Solutions
New Discussion

Multiple Root Directories?

 
Bill Thompson_8
Advisor

Multiple Root Directories?

How can I have multiple root directories as seen here http://www.gelsana.com/explain_this.htm
?
How does this work?
7 REPLIES 7
Andy Bustamante
Honored Contributor

Re: Multiple Root Directories?

>>> How does this work?

Very well.

>>> How can I have multiple root directories

"Root" is generally associated with the Unix world. VMS uses the logical sys$sysroot to define the operating system location.

sys$sysroot points to sys$specific and sys$common for an standard VMS installation. See the attachment. Some system managers will modify this.

In a cluster with a single system disk, each node will have a unique sys$specific for node specific files and share a single sys$common directory structure.

You can boot different system configurations (same version of the o/s) by selecting which root to boot, patches can be installed once in a clustered site.


If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Antoniov.
Honored Contributor

Re: Multiple Root Directories?

Bill,
welcome in vms forum. I looked at you web site and hope you still work with vms.

If you want to define a logical name pointing to two different directories you can:
$ DEF ,
Type HELP DEF for furthermore information.

Antonio Vigliotti
Antonio Maria Vigliotti
Kris Clippeleyr
Honored Contributor

Re: Multiple Root Directories?

Bill,

Actually the SYS$SYSROOT is a logical name that is defined as a search list.
The first translation yields what is called the specific 'root' for the system, the second is SYS$COMMON, the 'common root' for the system/cluster.
The figure 5-2 in the OpenVMS Cluster Systems manual gives a graphical representation of this construct ( http://h71000.www7.hp.com/doc/731FINAL/4477/4477pro_006.html#directory_map ).
The idea is that in a cluster environment with a common system disk, each system shares the major part of the OS with the other systems, but still providing for customization per system.
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Bojan Nemec
Honored Contributor

Re: Multiple Root Directories?

Bill,

"Root directories" works with multiple equivalence names. If you look to the DEFINE help you will see that the syntax is:

DEFINE logical-name equivalence-name[,...]

This means that you can define a logical name like this:

$ DEFINE a b,c,d

Now you have one logical name "a" which has 3 equivalence names "b","c" and "d". You can experiment with this:

$ CREATE A
^Z
$ DIR A
...
B.;1

Total of 1 file.
$ CREATE C
^Z
$ DIR A
...
B.;1 C.;1

Total of 2 files.

When you use the name "a" the system searches for "b","c" and "d". When the equivalence names are directories all of them are searched. You can try to define a logical name which has two or more different directories as the equivalence name. Something like this:

$ DEFINE a dka0:[b],dka0:[c]

(substitute dka0:[b] and dka0:[c] with two yours directories) and try to do:

$ DIR A

Now, we are close to the "Root directories" like SYS$SYSROOT, but we need a logical name which will point to a directory and will act as a device. You can define a logical name like this:

$ DEFINE b dka0:[b.]/TRANS=(CONCEALED,TERMINAL)

If you do a DIR B you will probably get an error, but DIR B:[000000] will give you the contents of the directory and DIR B:[*...] the contents of it and all its subdirectories.
A word about /TRANS=(CONCEALED,TERMINAL). CONCEALED means that when the system displays the contents it will display the logical name and not the physical name. In the output you will receive B: and not DKA0:[B.].
TERMINAL means that the translation should terminate (we put a physical device name in the equivalence name) and no more translations are needed.

If you put two or more such logical names as equivalence names in a new logical name you receive a logical name like SYS$SYSROOT.

Logical names like this can be wide used. For example: You have different departements working with the same application. Most of data is common to all departements but some data is not. Each departement has its own file for the specific data. You put all common files in a common directory tree and the specific data in a directory tree which is specific for each departement. Something like this:

dka0:[commondata] (and subdirectories)
dka0:[dep1data] (and subdirectories)
dka0:[dep2data] (and subdirectories)

define roots for each directory tree:

$ DEFINE COMMON dka0:[commondata.]/TRANS=(CONC,TERM)
$ DEFINE DEP1 dka0:[dep1data.]/TRANS=(CONC,TERM)
$ DEFINE DEP2 dka0:[dep2data.]/TRANS=(CONC,TERM)

Now for dep1 you define:

$ DEFINE DATADIR DEP1,COMMON

and for dep2

$ DEFINE DATADIR DEP2,COMMON

Now, when you need a file you use a name like:
DATADIR:[dir]filename


Bojan
Robert Gezelter
Honored Contributor

Re: Multiple Root Directories?

Bill,

As Hoff pointed out on OpenVMS.org, and others have pointed out here, your default directory appears to be a search list (I say "appears" because the output that you posted on gelsana does not include a SHOW DEFAULT command to see what your current default directory is set to.

If you current directory is set to SYS$SYSROOT:, you can easily see the results using the SHOW LOGICAL SYS$SYSROOT. You will get the results of the logical name translation as devicename:[SYS0.]. devicename:[SYS0.SYSCOMMON.]. While it must be done with care, Directories on a FILES-11 volume CAN appear in multiple places. In this case, [000000]VMS$COMMMON.DIR is aliased as [SYS0]SYSCOMMON.DIR (and [SYS1]SYSCOMMON.DIR, ... on a disk with multiple system roots).

Thus, there is only a single copy of the OpenVMS common files kept on a disk, no matter how many system roots inhabit the disk volume.

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com
Robert Gezelter
Honored Contributor

Re: Multiple Root Directories?

Bill,

A followon, as was noted in some of the discussion:

A rooted directory, e.g. SYS$SYSROOT is the root of a subtree, but is not the "root" of the filesystem terms, as in *NIX.

The actual root directory of the filesystem is devicename:[000000]. This directory is referred to as the MFD (Master File Directory). It contains entries for directories, and some housekeeping files. It also contains, as you might expect, an entry for itself, under devicename:[000000]000000.dir;1.

- Bob Gezelter, http://www.rlgsc.com
comarow
Trusted Contributor

Re: Multiple Root Directories?

Search trees help performance and keep files where they belong.

Let us examine sys$system:

It contains all the directories on a disk
but the specific directory is searched first.

For example if your root is sys0,
it will first look in sys0, if it doesn't find it there, it will look in syscommon/

For example common files should be in syscomon while node specific files in their own root.

Also, this helps reduce the size of directories. Large directories reduce performance, though that has been improved over the years.