Note: since this written, I have discovered that symbolic links should be used instead of mounting directories to other points on the disks, not mount points. I have not had time to re-write this article.
Directory PSX$ROOT:[000000] bin.;1 -> /disk$bigdisk/vms$common/gnv/bin
---- Original text ---
Mount point support was added to OpenVMS with VMS 8.3 as part of the Posix Root support.
A mount point allows you to set up a Posix Root in a way similar to a Unix or Linux system.
Until you mount a "file system" (another directory possibly on different disk) on a mount point, a mount point is an ordinary directory on OpenVMS.
If there were existing files in a directory used as a mount point those files are hidden when a directory is mounted on it.
When you mount a directory tree on that directory, even if that directory tree is on a separate volume, you can then access that directory as if it actually existed at that location.
Unlike Unix, the directory mounted has to be on OpenVMS mounted volume. Unix typically has a NFS export mounted on a mount point.
On OpenVMS, a NFS mounted volume appears as a VMS disk device. It is that OpenVMS disk device that you can mount.
On OpenVMS Mount points can only be on an ODS-5 volume, you can mount ODS-2 directory on it.
OpenVMS does not have native commands to mount and unmount directories on mount point. These commands, mnt and umnt are provided as part of the GNV kit.
SYSTEM privileges are needed to mount a directory. (I have not yet verified the minimum
privileges needed for this operation.)
With Coreutils 8.21 the df command will display the directories mounted on mount points in addition to the OpenVMS mounted volumes.
Mounted directories are not persistent across reboots, and are local to a cluster member.
When you set up a mount point, you want to avoid setting up an infinite directory loop, where by doing wild card directory of the mounted directory you reach the mount point.
A typical setup would be to mount directories on the Posix root or a directory near the root of a volume.
Filesystem Mounted on DISK$BIGDISK:[VMS$COMMON.gnv]usr.DIR /usr DISK$BIGDISK:[VMS$COMMON.gnv]man.DIR /man DISK$BIGDISK:[VMS$COMMON.gnv]lib.DIR /lib DISK$BIGDISK:[VMS$COMMON.gnv]include.DIR /include DISK$BIGDISK:[VMS$COMMON.gnv]etc.DIR /etc DISK$BIGDISK:[VMS$COMMON.gnv]bin.DIR /bin _EAGLE$DQB0: /EAGLE$DQB0
One of the problems with mount points can occur if the intended directories are not mounted by a command procedure run at system startup.
This can result directories and files are created on the mount point instead of the mounted directory tree. On OpenVMS when you create a directory any missing parent directories are also created which makes this easier to happen.
The HP GNV 2.1.3 and HP GNV 3.0.1 kits make this type of problem possible after it installs the files from the kit, it moves the files to be in the PSX$ROOT directory tree instead of [vms$common.gnv] and then it mounts the PSX$ROOT directory on [vms$common.gnv] using the psx$up_startup.com procedure that is called by the gnv$startup.com procedure.
This means if the gnv$startup.com procedure is not run, it is possible to install other products into the [vms$common.gnv].
In order to fix this, if you have a directory mounted that you need to dismount, you will need to use the umnt tool from the GNV kit. This tool will either be at device:[vms$common.bin]umnt.exe or at psx$root:[bin]\umnt.exe depending one what happened.
If you can not find the umnt.exe tool, then if you can make sure that the OpenVMS startup will not remount the directory, you can reboot the system to clear the directory.
Then you can move the files and directories off of the mount point to their correct locations.
Ticket #9, psx$root / gnv mount points backwards has been filed to track this issue. The plan is to have a future kit or procedure to change GNV back to being installed into [vms$common.gnv] and mount the directories as per the example in the previous section.
It may not be possible for an automatic command procedure to fix the [vms$common.gnv] directory if both it and the psx$root: both have files in them.
While not documented, OpenVMS mounted directories are stored in the LNM$MNT_DATABASE logical name table. This is from inspecting the source code supplied with GNV.