Appendix B - AFP and File Volume Names
Introduction to AFP and File Volume Names
The AppleTalk Filing Protocol (AFP) service creates mappings between the Macintosh workstation and VINES file volumes. Similar to the network drive-file volume mappings on DOS, Windows, and OS/2 workstations, this mapping lets Macintosh users see VINES file volume names in the Chooser. This appendix describes how AFP creates unique names for file volumes, using both long and short names.
When creating these mappings, the AFP service ensures the uniqueness of the file volume names according to these rules:
Rule 1
All StreetTalk names of 26 characters or less are guaranteed to be unique. Therefore, the name shown in the Chooser (the AFP volume name) is the StreetTalk name assigned to the file service.
All StreetTalk names that are longer than 26 characters follow the next three rules:
Rule 2
If multiple file service names are identical within the first 26 characters and they reside on the same disk, the AFP service uses the VINES internal databases of the server that these file services reside on to assign a unique, two-digit integer to each file service. The first file service is not assigned a unique integer.
Once this two-digit, unique identifier is assigned to each file service, it remains consistent for the life of the file service. Even if the original file service (the one that is not assigned a unique integer) is deleted, the remaining file services are still identified by the same integers.
The example below shows the StreetTalk names of two file services created on the same disk on the same server, and the volume names that the AFP service displays in the Chooser.
If the original file service - An Extremely Long Name@ALongGroupName@WCTUS - is deleted, the AFP service continues to display the name of the remaining file service as An Extremely Long Name@A01.
Rule 3
If two or more file service names are identical within the first 26 characters, but they reside on different disks, then AFP must perform the appropriate name arbitration when it creates the AFP volume name. In creating unique names for two such file services, AFP inserts the disk number at the end of the AFP volume name. The example below shows how AFP creates unique names for two file services on different disks:
In creating unique names for these two services, AFP inserts the disk number of the second service at the end of the AFP volume name.
This naming method is not consistent. If you delete the first file service (An Extremely Long Name@ALongGroupName@WCTUS), then the next time you stop and start AFP, the AFP volume name for the second file service changes from: An Extremely Long Name@AL2 to An Extremely Long Name@ALo.
Rule 4
If two or more file service names are identical within the first 26 characters and some reside on the same disk while others reside on different disks, AFP first uses Rule 2, and then Rule 3. The examples below show the StreetTalk names of four file services - two on Disk 1 and two on Disk 2 - and their corresponding AFP volume names.
In the last case, where Rules 2 and 3 are used, the disk number is always inserted at the end. If a disk number must be inserted at the end, AFP automatically moves the directory number to the right the appropriate number of places before inserting the disk number.
AFP also arbitrates or resolves conflicts of the volume's short names to ensure that there are no duplicates. This arbitration is a simple numeric insertion at the end of the short name. If the short name that is generated for a long name already exists for another file service, AFP then inserts or appends (depending on the current length of the short name) an integer to the end of the short name and looks up the new name. This arbitration continues until a unique short name is found.
Table B-1 provides examples of how AFP arbitrates the short names of file services.