NDSDir

Version PK-4.60
(Nov 22, 1998)


 DISCLAIMER:
     THIS  PRODUCT  IS  SUPPLIED  "AS  IS".  DREAMLAN 
     DISCLAIMS ALL WARRANTIES,  EXPRESSED OR IMPLIED,
     INCLUDING, WITHOUT  LIMITATION,  THE  WARRANTIES
     OF  MERCHANTABILITY   AND  OF  FITNESS  FOR  ANY
     PURPOSE.  DREAMALN   ASSUMES  NO  LIABILITY  FOR
     DAMAGES,  DIRECT  OR  CONSEQUENTIAL,  WHICH  MAY
     RESULT FROM THE USE OF THIS PRODUCT.

Introduction

NDSDir is a NetWare NLM utility to display the name and sizes of all the NDS related file from the hidden SYS:_NETWARE directory. It is a handy tool to determine the total size of your NDS database files, including any backup files (created by DSREPAIR) that may be hogging your SYS: volume disk space!

As an added bonus, NDSDir allows you to copy any and all the NDS-related files from the SYS:_NETWARE directory to a "standard" directory so you can back up these files (see the Uses of NDSDir section below for more information). Although NetBasic shipped with NetWare 4.11 (but not with NetWare 5) and earlier versions of Novell's TOOLBOX.NLM allows you to gain access to the hidden directory, but they cann't manipulate all of the NDS-related files as NDSDir can.

NDSDir also provides a very cost-effective method for backing the NDS of a single-server NetWare 4 or NetWare 5 network. When used in conjunction with FSTrust, you can backup your server with any non-NetWare-aware backup solution!


What's New


Notes

  1. A free connection slot is needed on the server for the utility to load.

  2. This NLM has not been tested with NetWare 4.0x, but we do not expect a problem with the older versions of NetWare 4.

  3. NDSDIR.NLM has not been fully tested with SFT III. Should you want to use it on SFT III servers, try loading the NLM on the MSEngine.

  4. In the demo mode, the file names are displayed in the actual order the files are found on the disk. In the licensed mode, by default, the names are listed in alphabetical order. You can override this using the -NOSORT keyword or use the -A flag in the interactive mode. The sorted mode has a limit of 1,000 file names.

  5. The server must have a valid license (even a 2-user) installed or the NLM will not load correctly.
  6. Files may be copied between volumename:_NETWARE and SYS:DREAMLAN only. These directory names are hardcoded into the NLM at this time, but not the volume name of the _NETWARE directory (see Side Notes section below).

  7. At this time, NDSDir puts an arbitrary cap of 1,000 NDS files for the LIST command. That means, only the first 1,000 files in the SYS:_NETWARE directory will be displayed on the console screen or recorded in the report file using the sorted mode. However, the GET/PUT operation is not limited to the number of files in the SYS:_NETWARE directory. Or, you can use the -NOSORT option which does not limit on the number of file names.

  8. Not much error checking is placed on the command-line options. Therefore, sometimes the error or warning message may not directly point to the real cause of the error or warning. It is best to use the interactive mode.


Installation

No special installation steps or program need to be used. Simply copy NDSDIR.NLM and NDSDIR.LIC to a diskette. Starting with v4.51, NDSDIR.NLM may also be loaded from SYS:SYSTEM (make sure you also put the NDSDIR.LIC there).

Without a valid license, this copy of NDSDIR.NLM runs in the demo mode. It will only list the files in your SYS:_NETWARE directory.

If you encounter an error message similar to the following about fmod, ensure MATHLIB.NLM is loaded (it is not auto-loaded by the NLM):

Server-4.10-1586: Loader cannot find public symbol: fmod


Usage

NDSDIR.NLM offers an interactive menu interface as well as supports a number of optional command-line parameters (so you can use it in an NCF file):

LOAD NDSDIR -C | -LIST | -REPORT | -NOSORT | -GET | -PUT |
-V volname | -F filename.ext

If you load NDSDIR.NLM without any command-line parameter, you'll be prompted for options. The command-line options are described below.

None of the command-line options are case-sensitive.

Undocumented NDSDir Option

There is a -ZAP command that is not documented in the help built into the NDSDIR.NLM. The -ZAP command allows you to delete any files from the SYS:_NETWARE directory! As a precaution, NDSDIR.NLM will not allow you to delete any files from the SYS:_NETWARE directory that has the ".NDS" file extension. The command option is implemented to allow you to clean up the .OLD files created by DSREPAIR, so you can free up some disk space. There is no default filename for the ZAP option. You must provide the filename as part of the command; however, you can use wildcards. At this time, you can NOT remove any of the audit related files (e.g. NET$AUDT.* files) using NDSDIR.

For example, to remove all .OLD files from SYS:_NETWARE directory, the syntax is: LOAD NDSDIR -ZAP -F *.OLD. Use the ZAP command with extreme caution. Any files deleted from the SYS:_NETWARE directory are automatically purged, without a chance to salvage. (While working on this NLM, we considered having a SALVAGE option to accompany the ZAP command. But to our dismay, we found that any files deleted from the SYS:_NETWARE directory are purged immediately. Therefore, if you are to ZAP any files, we STRONGLY recommand that you use the GET option to make a copy of the file(s) first.)

To protect files in SYS:_NETWARE directory were deleted by accident with the ZAP command, you are asked to enter an authenicate code. Your personal code is provided later in the Authenication Code section.

You should keep this file in a safe place, and separate from the software.

Side Notes

There is a hidden _NETWARE directory on each of your NetWare 4 volume. This is where the volume audit files are located. NDSDir will allow you to move files between SYS:DREAMLAN and the _NETWARE directory of any volume. The only files you can not move are the audit files as mentioned above. This may change with later versions of NDSDir. To access the _NETWARE directory of a volume other than SYS:, use the -V option (or use -A in the interactive mode).

For example, LOAD NDSDIR -V DATA -LIST will list the contents of the DATA:_NETWARE directory. Because there are generally no *.NDS files in the _NETWARE directories on volumes other than SYS:, therefore, NDSDir will, at this time, allow you to delete *.NDS files from those directories. If a later version of NetWare 4 or DS.NLM uses *.NDS files located on other volumes, this feature may be removed to protect your NDS database.

Authenication Code

An authenication code is needed when you exercise any one of the GET, PUT, and ZAP command options. This is to protect you from damaging the NDS files accidentically. The protection on the GET command is to prevent people from copying your NDS files, unknowningly.Your authenication code is ----- (not shown here). Please note the case.

Configuration

n/a

Brief Explaination of NDS Files

Have you ever wondered what the files in this hidden SYS:_NETWARE directory do? Here's a brief run down on the commonly found ones in NetWare 4:

       BLOCK.NDS       -- contains NDS object information (?)
       ENTRY.NDS       -- contains NDS object trustee information (?)
       PARTITIO.NDS    -- contains NDS partition information
       VALLICEN.DAT    -- contains backlink information (?)
       VALUE.NDS       -- contains NDS object values
       *.000           -- login scripts
       *.$AF           -- related to audit files
       MLS.*           -- NetWare 4 licenses

Uses of NDSDir

Other than using NDSDIR.NLM to list the contents of the SYS:_NETWARE directory, here are some possible applications of this NLM:

NDS backup in a single server environment. If you have a single NetWare 4 or NetWare 5 server environment, NDSDir may be used as a means to backup and restore your NDS database, using the GET and PUT commands. This, however, is NOT recommended nor endorsed if you have a multi-NetWare 4 (or NetWare 5) server environment (i.e. more than 1 NetWare 4 or NetWare 5 server). This is because of the distributed, and replicated, nature of the NDS -- you cannot guarantee that the NDS files on all servers are backed up at the same time.

You should not rely on NDSDir as your production server's NDS backup. There are much more better commercial backup software for this purpose. However, if you are working in a testing environment, NDSDir can be a great tool for you to first backup your NDS, perform your test, and restore if necessary. It is much more convenient than using a backup software. This is also useful in a classroom/training environment.

It is important to keep the Transactional flag (TTS flag) on the *.NDS files. This is one of the reasons why the report file shows the file attributes. If you ever copy any of the NDS files from the SYS:DREAMLAN to a DOS device (such as a diskette) and copy them back to SYS:DREAMLAN, some or all of the file attributes may be lost. The report file can tell you what their origianl attributes are, so you can correctly set them before putting them back into SYS:_NETWARE.

We do not recommend nor endorse the use of NDSDir as an NDS backup solution in a multi-NetWare 4 (or NetWare 5)-server environment. Also see What's New re NetWare 5 NDS files.

Deleting or Swapping Server Licenses in NetWare 4. As we know, the INSTALL NLM can only remove the last licensed installed. So, if you need to remove a license that is in the middle of the chain, it is not easy. Also, if you need to replace one of the licenses with a different one, it is not easy either. However, with NDSDir you can easily delete or swap server licenses using the following procedure.

A. Assume you need to replace the 2-user license whose serial number is "12345678" with a 5-user license:

  1. At the server console, get a list of your licenses currently installed on the server using the VERSION console command. You will see a list similar to the following:
            Maximum number of Licensed Connections:  14
            Current License Chain:
            Serial Number   Connections    License Type  Version
            ABCDEFGH        10             MAIN          4.10
            12345678        2              MAIN          4.10
            A1B2C3D4        2              MAIN          4.10
    
    (On your license diskette, the license file is called SERVER.MLS. However, once it is installed on the server, the file is named MLS.*. The first license is called MLS.000, the second one called MLS.001, etc.)

  2. Copy from the new license diskette the file SERVER.MLS and call it MLS.001 in SYS:DREAMLAN (since it is the second license file that you wish to replace).

  3. Use the PUT command to put the new license file back out to the SYS:_NETWARE directory: LOAD NDSDIR -PUT -F MLS.001

  4. To make the server recognize the new license file, again at the server console, enter the VERSION console command.

B. Assume you need to delete the second 2-user license whose serial number is "12345678":

  1. At the server console, get a list of your licenses currently installed on the server using the VERSION console command. You will see a list similar to the following:
            Maximum number of Licensed Connections:  14
            Current License Chain:
            Serial Number   Connections    License Type  Version
            ABCDEFGH        10             MAIN          4.10
            12345678        2              MAIN          4.10
            A1B2C3D4        2              MAIN          4.10
    (On your license diskette, the license file is called SERVER.MLS. However, once it is installed on the server, the file is named MLS.*. The first license is called MLS.000, the second one called MLS.001, etc.)

  2. Use the GET option to make a copy of all the MLS file (i.e. MLS.*): LOAD NDSDIR -GET -F MLS.*. The GET command puts the files in SYS:DREAMLAN.
  3. Use the FLAG utility to make MLS.001 and MLS.002 read-writable (i.e. FLAG MLS.001 N). Delete MLS.001. Rename MLS.002 to MLS.001.

  4. Use the ZAP option to delete MLS.003 from the SYS:_NETWARE directory.
  5. Use the PUT command to put the "new" MLS.001 license file back out to the SYS:_NETWARE directory: LOAD NDSDIR -PUT -F MLS.001.
  6. To make the server recognize the new license files, again at the server console, enter the VERSION console command.

The above are just some example usage of NDSDir.


Registration

The full version of NDSDIR.NLM is available by registering on-line through the following Web sites:

The NDS tree name is required as it is used to generate a key. The registration cost is $99 US. Canadian registration is $135 CDN plus GST. All other countries, please remit in US funds.

You can also FAX a company Purchase Order to +1 (905) 887-3836. Please make sure you either include your tree name information on the FAX or send a follow up email.

Special site agreements for multiple trees and service providers are available. Although the license does not grant you the right to resell the program (for a profit; but you can charge the customer a service charge for your time). If you are a service provider, you can register copies on behave of your customers (by providing your customer's mailing information -- this is used only for tracking purposes). At the same time, we ask you to send us a separate email indicating that you are registering on behave of your customer and inciate in this email if further software upgrade (free or for a charge) be send to you or the customer directly, and an email address for that purpose.


Other Information

NDSDir is written in C using WatCOM C optimizing compiler and Novell Developer Kit. No undocumented APIs are used.

Inclusion of this utility on CD-ROMs (except for backup purposes) without permission from DreamLAN Network Consulting Ltd. is expressly prohibited.


Revision History