Thursday, November 23, 2006

Using Junction Points or SoftGrid for Installing multiple Lotus Notes releases on a single system?

A while ago I posted a Tips for installing multiple Notes client releases on a single system

Then Alain Romedenne added a comment suggesting the use of substituted symbolic directories. This led me off on an interesting tangent. Yet another diversion, Oh will I ever get any real work done?

I had never considered using "symbolic folders/directories" before this. It turns out that UNIX and therefore Linux (I presume) has had this capability for ages, and that Microsoft Windows has had it since the time of Windows 2000 with NTFS and NT Server 4.0 (not FAT or FAT32). I'll leave UNIX/Linux out of this discussion, as the great bulk of Notes/Domino installations are windows based.

This is NOT going to be a tutorial! Instead, here are some background resources that will help you get the picture. Lots of food for thought:

  • How to create and manipulate NTFS junction points
    (Microsoft support: Article ID 205524 -- may require registration)
    "You can surpass the 26 drive letter limitation by using NTFS junction points. By using junction points, you can graft a target folder onto another NTFS folder or "mount" a volume onto an NTFS junction point. Junction points are transparent to programs. "
  • Symbolic link (Wikipedia) - "Symbolic links operate transparently, which means that their implementation remains invisible to applications. When a program opens, reads, or writes a symbolic link, the operating system will automatically redirect the relevant action to the target of the symlink. Functions do, however, exist to detect symbolic links, so that applications may find and manipulate them."
  • NTFS symbolic link (Wikipedia) - "an NTFS symbolic link (symlink) is a file-system object that points to another file system object. The object being pointed to is called the target. Symbolic links should be transparent to users; the links appear as normal files or directories, and can be acted upon by the user or application in exactly the same manner."
  • Over at shell-shocked there's Windows Symbolic and Hard Links - Windows has had symbolic links since Windows 2000, or more specifically, NTFS 5.0. This used to be called "junction point" functionality, and was renamed "reparse point" functionality by the time Windows XP came out. ... To some of you, the age of this functionality, or even its existence, may come as a surprise. This is itself not a surprise. More than four years after this functionality became available, it seems Microsoft still has barely documented it, and hasn't exposed it in Windows except in the most cursory way. It is still a far bigger chore than necessary finding information about this functionality in Microsoft's knowledge base. Anyone who want to learn about it can only resort to scrounging across the web. Links on Windows exist, but they are useable only due to the efforts of a handful of third party tools developers. That's the Windows story on symlinks. ... This article is an attempt to present a comprehensive and authoritative user's view of Windows links, particularly symlinks.
  • Scott Hanselman ... How do you organize your code? and Windows Vista, Junctions and moving My Documents to another drive
  • Junfeng Huang's Windows Programming Notes ... Symbolic link in Windows Vista which explains the the MKLINK command (new in Vista), with examples.
Prior to Vista, Windows did not provide a simple way to create/edit/delete these "junction points", but there are two FREE tools that provide an interface to do so:
  • Junction v1.04 - a command-line tool from from Sysinternals (recently acquired by Microsoft) ... "Windows 2000 and higher supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer. For example, if the directory D:\SYMLINK specified C:\WINNT\SYSTEM as its target, then an application accessing D:\SYMLINK\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS. Directory symbolic links are known as NTFS junctions in Windows. Unfortunately, Windows comes with no tools for creating junctions - you have to purchase the Win2K Resource Kit, which comes with the linked program for creating junctions. I therefore decided to write my own junction-creating tool: Junction. Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Windows' Remote Storage Service (RSS), as well as volume mount points."
  • Junction Link Magic (or just "Link Magic") - a nice Windows GUI interface by Mikael Nordell, available from Rekerwonder Software

    When you launch this program it starts scanning all of your drives, presumably to build a list of all the existing folders and their junction points in oder for you to be able to edit/delete existing junction points. In my case this would have taken many minutes since I have many tens gigabytes of folders, so I clicked the Cancel button to abort the scan because I only wanted to experiment with creating a junction point to get the feel of things.

    TIP: if you click the More info... button you are served up with several screens of useful help text, such as (with slight reformatting to appear better in this post):

    What can you do with junction points? - By using junction points, you can graft a target folder onto another NTFS folder or "mount" a volume onto an NTFS junction point. You could think of using junction points in the following cases: (1) When moving programs from one place to another. E.g. moving your "Program Files" directory to another drive, and linking the original "Program Files" directory to this new location. (2) When your hard disk is becoming too small. Just add another disk, move the contents of one or more large folders to it, and link them with a junction point. (3) When you want to surpass the 26 drive letter limitation.

    But you also get some salutary warning information ... Where can junction points be used? - Junction points can not be used just anywhere. These are the conditions:
    (1) The source (host) folder: (a) Must be located on a volume formatted with NTFS 5.0 or higher. NTFS 5.0 is supported on computers with Windows 2000, Windows XP and higher. Windows NT 4.0 with Service Pack 4 can read from and write to NTFS 5.0 volumes, but the new features in NTFS 5.0 are disabled under Windows NT 4.0. (b) Must be an empty folder, if not the creation of a junction point would make its contents unreachable.
    (2) The destination (target) folder: (a) Can be a folder on a FAT or NTFS volume. (b) Should not be located on a network volume or on a removable disk. (c) Junction points work best when they are mounted on the same volume. (d) If a junction point is mounted such that the target folder and host folder are on different physical disk resources, the resources must be in the same cluster group. The physical disk resource that contains the host folder should be dependent on the physical disk resource that contains the target folder. If the drive that contains the target folder does not come online, the drive that contains the host folder does not start.
    (3) Junction point precautions - Junction points have to be used with care. If you are not sure of what you are doing, DO NOT CREATE JUNCTION POINTS! Microsoft is so scared of it that it doesn't offer ready access to junction point creation in Windows 2000 and XP. We recommend you follow these rules closely when using junction points:
    (a) Use NTFS security to protect junction points from inadvertent deletion. (b) Use NTFS security to protect files and directories targeted by junction points from inadvertent deletion or other file system operations. (c) Never delete a junction point using Explorer, a del /s command, or other file system utilities that walk recursively into directory trees. These utilities will affect the target directory and all subdirectories. Instead, use Junction Link Magic to delete junction points. (d) Use caution when applying security ACLs or changing file compression in a directory tree that includes NTFS junction points. (e) Do not create namespace cycles with NTFS junction points. (f) Place all your junction points at a secure location in a namespace where you can test them out in safety, and other users will not mistakenly delete them or walk through them.

In light of all these warnings, I've come to the conclusion that using junction points is definitely NOT the way to go for multiple versions of Lotus Notes/Domino on a single system! However, junction points definitely would be useful in certain circumstances, such as when you've run out of Windows drive letters.

- - - - -

Quite coincidentally, a few days ago I also discovered the existence of SoftGrid which was originally developed by Softricity. They were and acquired several months ago by Microsoft, and at the moment there is a hiatus in sales/support for SoftGrid: I tried getting info about pricing from the Local Microsoft Australia office, and was pointed to the international web site but filling out an information request form on that site has led to no answer after a week or so!

You'll find some general info at How SoftGrid Works and Video Demonstrations and System Architecture and The Soft Grid: The Future of Software

I found the SoftGrid Flash Tour illuminating enough for me to decide that SoftGrid would be extreme overkill for a lone (and lonesome?) Notes/Domino developer. However I could see that SoftGrid would be an excellent solution for Windows application sharing in a corporate environment.

3 comments:

  1. Have you had any luck using a junction point on the Domino server? I have a request to put some existing domino dbs on a server but we require a certain directory structure. There are hardcoded entries in the db pointing to another directory structure.

    I've setup the junction point but I get the "This db is used be another user. In order to share a database put it on a Domino server instead of a file server." The junction point is e:\lotus\domino\data\cis\ and it points to e:\lotus\domino\data\ma\cis\

    Seems pretty straight forward to me. Have you had any luck with this?

    thanks,
    Michael

    ReplyDelete
  2. No, Michael, I haven't actually tried it because I suspected that it would come up with issues like this.

    I'm not sure what your full requirement is, but wonder if you've tried using the "directory redirect" feature of Domino (I can't remember its proper name).

    I'm not trying to teach you to suck eggs as the saying goes, but for example, in the Domino\Data directory you would have a text file called (say) MyCIS.dir containing the line "e:\lotus\domino\data\ma\cis\
    " [without the quotes]. Then it certainly WILL be accessible under Domino in the File Database Open dialog as folder "MyCIS" -- would that do the job for you? Cheers, Tony.

    ReplyDelete