The AppleTalk Filing Protocol (AFP) file service environment is established when you load the AFP module. Typically, the AFP module is loaded from the file server's AUTOEXEC.NCF file, as shown in the sample configurations in this guide (see Figure 3-4 on page 35 for an example).
Macintosh requests are sent to the NetWare file server via AppleTalk, as shown in Figure 43. The file server receives these requests and uses the AppleTalk Filing Protocol (AFP) to allow the Macintosh user to log in and access data on the server.
Figure 43
Macintosh Initiating a Login Session with a NetWare Server
Once a Macintosh user logs in to the NetWare file server, the Macintosh interface and applications appear very much as if the user were accessing a local Macintosh disk. Two basic NetWare for Macintosh features make this possible:
The NetWare operating system (Version 3.0 or later) uses "name spaces" to extend the directory structure to accommodate different file naming conventions used by client operating systems. A name space maintains and checks the validity of filenames based on a specific set of rules, such as the Macintosh rules that a filename can be up to 31 characters, can include spaces, and cannot include the colon character (:). Name spaces allow a user who logs in to a NetWare file server from a different client platform to see folders and files as he or she would expect to see them. The Macintosh name space depends on a support module, which must be loaded before adding the name space to a volume. Once the name space has been added to a volume, the support module must be loaded before that volume is mounted; otherwise, the volume fails to mount. To load the support module before adding the Macintosh name space, type this command at the server console prompt: LOAD MAC <Enter>
You can then add the name space, as described in Adding the Macintosh Name Space to Volumes. To make sure the support module is loaded before the server attempts to mount its volumes, you should add the LOAD MAC command to the STARTUP.NCF file, as shown in the configuration examples in this guide. The DOS name space is part of the NetWare operating system. However, you must explicitly add the Macintosh name space to each volume that supports Macintosh clients. Use this command: ADD NAME SPACE MACINTOSH TO VOLUME name <Enter>
name is the name of the volume. When you add the Macintosh name space to a volume, NetWare version 3.0 or later creates a separate name space for Macintosh folder and filenames and links those name space entries to directory table entries. Macintosh users and processes can then create folders and files on the volume. For example, Figure 44 shows directory table entries for a Macintosh file on a volume that has both the Macintosh and OS/2 name space: Figure 44
When a Macintosh user creates "Basic text file," NetWare calls the Macintosh name space and the filename is checked for validity according to Macintosh file-naming rules. When the Macintosh name space has validated the filename, NetWare calls the DOS name space. The DOS name space finds the name invalid according to DOS file naming rules, so it creates a valid DOS filename by truncating the name to eight characters and dropping the spaces, resulting in the name "BASICTEX" for that file. In the OS/2 name space, the same procedure is repeated. AFP requires that file servers maintain a desktop database that contains information associating documents and applications with icons, and providing bitmap representations of the icons. The Macintosh Finder uses this database to build the familiar Macintosh graphical user interface on the server's volumes, just as it uses the Macintosh desktop file on the local Macintosh disk(s). In NetWare for Macintosh, the DESKTOP.AFP folder contains three files that implement the AFP desktop database. The AFP module creates DESKTOP.AFP and creates and initializes its files at the root of each volume that supports the Macintosh name space. The Macintosh Finder initializes updates of these three files:
The Macintosh Name Space
Loading the Name Space Support Module
Adding the Macintosh Name Space to Volumes
Directory Table Entries Linked to Three Name Spaces
The Desktop Database
| Filename | Contents |
|---|---|
ICONINDX.AFP |
Information linking documents and applications with their icons |
ICONDATA.AFP |
Bitmap representations of the icons |
APPLDATA.AFP |
Information about the location of an application so that it can be found quickly when a user double-clicks a document |
The Macintosh Finder updates the desktop. Typically, when the Finder on a client Macintosh copies an application to the file server or moves an application to a new folder, the Finder adds the icon and application data to the desktop.
You can force a complete update by rebuilding the desktop from a Macintosh client. (See Rebuilding the Desktop.) Doing so causes the Macintosh Finder to traverse the file systems on the rebuilt volume in order to update all Macintosh icon and application data.
If you support NetWare for Macintosh on a volume that was previously configured as a target volume for the Macintosh VAPs, the newly initialized DESKTOP.AFP folder (created by the AFP module) will not contain any icons or application information related to the Macintosh applications that have already been installed on the file server.
Macintosh users logging in via the AFP NLM will see the existing files and applications, but the icons will be "generic," and double-clicking the icons will not open the appropriate application. Generic icons for Microsoft Word® are shown in Figure 45.
Figure 45
Generic Icons Indicating That the Desktop Should Be Rebuilt
The Macintosh VAPs created a hidden folder named DESKTOP. While this folder follows the same principles as the desktop database created by the AFP NLM, it uses a different format and will maintain information only as it is updated by clients logging in to a NetWare v3.12 file server through the Macintosh VAPs. Clients logging in to the file server via the AFP NLM will be able to access only the information contained in DESKTOP.AFP. If you wish to maintain this type of configuration, you should occasionally rebuild the desktop from each type of Macintosh client.
If you are installing NetWare for Macintosh on a file server that was previously a NetWare version 3.0 or later target for the NetWare for Macintosh VAPs and you intend to use the file server both in native-mode (using the NLMs) and as a target to the Macintosh VAPs, you should be aware that the two desktop folders, DESKTOP.AFP for the NLMs and DESKTOP for the VAPs, will become inconsistent over time. For this reason, using a file server both in native-mode and as a target to the Macintosh VAPs is not recommended.
To force an update of the application and icon data in the DESKTOP.AFP folder, follow these steps:
Restart the Macintosh using the Finder (not MultiFinder, if the Macintosh is running System 6.x).
Log in as a supervisor from a Macintosh client.
Make sure you are logging in from a client using the AFP NLM, not across the IPX internet using the Macintosh VAPs.
When you mount the server's volume(s), hold down the Command-Option keys on the Macintosh keyboard.
This action causes the Finder to traverse the file system on the file server's volumes and update the contents of each DESKTOP.AFP folder with the current location and document icon for each Macintosh application. You will be prompted to confirm that you wish to rebuild the desktop on the server's volume(s).
After the Finder rebuilds the desktop, Macintosh users see the appropriate icons for Macintosh applications and, in most cases, can open an application by double-clicking it. Macintosh icons are shown in Figure 46.
Figure 46
Macintosh Icons after Rebuilding the Desktop
If you have removed an application from the server's volume and the application does not exist on any mounted volumes or on the Macintosh local hard disk, the icons for documents created in that application still appear generic after you rebuild the desktop. You can remedy this situation by copying the application to the server and rebuilding the desktop again.
NBACKUP does not back up the desktop files. If you are restoring data and applications by using NBACKUP, you should rebuild the desktop following the restoration.
The information maintained in the DESKTOP.AFP is never automatically cleared. If the environment allows Macintosh clients to add and move applications, the desktop folder can eventually contain enough obsolete information that Macintosh users begin to notice slowed performance in launching applications. In addition, the DESKTOP.AFP folder can become corrupted if the Finder modifies it during an error condition, or if you maintain it incorrectly (for example, if you inadvertently restore it from an old backup tape). If the desktop has become corrupted, icons can sometimes display incorrectly.
NetWare for Macintosh provides an option for clearing the information in DESKTOP.AFP; you must then rebuild the desktop from a Macintosh client. While the AFP module is loaded on the file server, the files contained in DESKTOP.AFP are in use and cannot be deleted, so you must unload AFP first. To clear the DESKTOP.AFP folder on all volumes that support Macintosh clients and are currently mounted, first make sure that all Macintosh clients are logged out. Then, at the file server console, type
UNLOAD AFP <Enter>
LOAD AFP CDT <Enter>
You should then rebuild the desktop. See Rebuilding the Desktop.
When Macintosh users mount volumes other than the SYS volume on the Macintosh desktop, only the volume name (not the server name) displays under the icon. If you have not assigned descriptive names to server volumes, Macintosh users can be confused about which volumes belong to which servers when they have mounted multiple volumes on their desktop.
If you wish, you can assign "alias" volume names that will be advertised on the AppleTalk network. The alias you assign will be advertised only on the AppleTalk network. It does not affect users who are logging in via other protocols, such as NCP.
The AFP module creates a hidden ASCII file named VOLNAMES.AFP in SYS:\SYSTEM. The AFP module initializes this file with the following name mapping for the SYS volume:
SYS=server-name.SYS
server-name is the NetWare server name. You can assign an alias name to the SYS volume, using this format:
SYS=alias
You can assign an alias name to any other volume that supports Macintosh clients by adding a command line to the file, using this format:
Volume-name=alias
alias can be up to 27 characters, and cannot include the colon (:) character. (You should also avoid the underscore (_) and slash (/) characters in order to prevent confusion with pathname conventions in Macintosh software that emulates other platforms.) Control characters (such as Å) and any character whose ASCII code is less than a blank, are treated as carriage returns.
For example, if two NetWare servers support a volume named PROJ, you can assign an AppleTalk alias to the PROJ volume on SERVER-1 as follows:
Open VOLNAMES.AFP in a text editor.
You can use any ASCII text editor from a client or at the server console. For example, at the server console type
LOAD EDIT SYS:\SYSTEM\VOLNAMES.AFP <Enter>
This command line loads the EDIT NLM and opens a window for the file. In this example, assume two volumes supporting the Macintosh name space: SYS and PROJ. The file initially contains only one line, mapping the SYS volume name:
SYS=SERVER-1.SYS
Add a command line for the PROJ volume and its alias. After you establish the alias for the PROJ volume, the file looks like this: SYS=SERVER-1.SYSPROJ=SERVER-1.PROJ
Press <Esc> to save your changes and exit the editor. Unload the AFP module and load it again. The new name will not be advertised on the AppleTalk network until you unload the AFP module and load it again. Type these commands at the console prompt: UNLOAD AFP <Enter> LOAD AFP <Enter>