1 XEROX 1108 USER'S GUIDE 1 XEROX 1108 USER'S GUIDE FILE SYSTEM 1 FILE SYSTEM 1 4. FILE SYSTEM 6 2 Introduction 1 The 1108 hard disk file system is designed to provide Interlisp-D users with a flexible mechanism for storing and accessing files. Like the file systems for the 1100 and the 1132, the 1108 file system supports such features as random access and version numbers on files. In addition, the 1108 local file system supports a hierarchical naming structure for files. 2 Disk Partitions 1 The hard disk used with the 1108 may be partitioned into up to 10 regions called logical volumes. Logical volumes are like directories on the disk device: they may be used to hold Interlisp virtual memories, or Interlisp files. You can partition the disk with the Installation Utility floppy. Because partitioning the hard disk erases all its contents, you are advised to partition the disk appropriately before storing anything on it. Otherwise, you will have to off-load all files from the disk, repartition it, and then copy the files back to the disk. Although an Interlisp virtual memory file can coexist on a logical volume with other files, it is generally advisable to give each virtual memory file a logical volume that it does not share with anything else. Otherwise, the resulting fragmentation adversely affects swapping performance. A logical volume intended to contain an Interlisp virtual memory should be between 8,000 disk pages (4 megabytes) and 64,000 pages (32 megabytes) long. The closer to 64,000 pages you can make your virtual memory volume the better, provided there is still enough space on the disk for any other volumes you might need. Note that to store Interlisp files on a logical volume, you must create a Lisp directory on that volume (see below for instructions). 2 File System Utility Functions 1 So long as there is a logical volume with a Lisp directory on it, you will have a local disk device called {DSK}. This device can be used from within Interlisp-D just like the {DSK} device on the 1100 and the 1132, except that it supports a hierarchical naming structure for files. If you do not have a logical volume with a Lisp directory on it, Interlisp emulates the {DSK} device by a core device. (A core device is a file device whose backing store is entirely within the Lisp virtual memory.) However, this causes three problems. (a) The core device provides limited scratch space for some system programs; (b) when running GREET, Interlisp fails to find {DSK}Init.Lisp and has to prompt you for an init file; and (c) since the core device is contained in virtual memory, it (and the files stored on it) can last only as long as you keep your virtual memory image. To create a Lisp user file directory on a logical volume, call (CREATEDSKDIRECTORY VOLUMENAME) [Function] CREATEDSKDIRECTORY affects only the specified volume. CREATEDSKDIRECTORY returns the name of the directory created. You should install an Interlisp directory only the first time the logical volume is used. After that, the system automatically recognizes and opens access to the logical volumes that have Interlisp directories on them. Should you ever want to get rid of a Lisp directory (and all the files in it), call (PURGEDSKDIRECTORY VOLUMENAME) [Function] PURGEDSKDIRECTORY affects only the Lisp files on the specified volume. An alternative way to get rid of a Lisp directory is to use the System Tool to Erase the entire logical volume. To find out if a particular logical volume already has a Lisp directory on it, call (LISPDIRECTORYP VOLUMENAME) [Function] To find out what logical volumes you have on your local disk, call (VOLUMES) [Function] To find out the total size of a logical volume in disk pages, call (VOLUMESIZE VOLUMENAME) [Function] To find out the number of free pages left on a volume, call (DISKFREEPAGES VOLUMENAME RECOMPUTE) [Function] And to find out which logical volume contains the virtual memory you are currently running in, call (DISKPARTITION) [Function] There is a display window that can keep track of the information provided by LISPDIRECTORYP, VOLUMES, VOLUMESIZE, and DISKFREEPAGES. The display window can be in one of three states: ON, OFF, or CLOSED. ON means the display window is updated whenever the file system state changes. (This continuous updating can slow down the file system significantly.) OFF means that the display window is open, but updated only when you left-button it with the mouse. CLOSED means that the display window is closed and never updated. The display mode is initially set to CLOSED. To change the state of the display, call (DSKDISPLAY NEWSTATE) [Function] DSKDISPLAY returns the old state of the file system display, and if NEWSTATE is one of the litatoms ON, OFF, or CLOSED, then the display state is changed to NEWSTATE. To control the position of the display window, call (DSKDISPLAY PLACE) [Function] Once the display window is open, you can update it or change its state with the mouse. Left-buttoning the display window updates it, and middle-buttoning the window brings up a menu that allows you to change the display state. Finally, once an Interlisp directory has been installed on a logical volume, any program running in Lisp has access to the Lisp files on the volume. Access is provided through the usual device-independent file interface: CONN (to connect to any directory or subdirectory on the local disk), OPENSTREAM, CLOSEF, DELFILE, GETFILEINFO, SETFILEINFO, BIN, BOUT, LOAD, etc. 2 File Name Conventions 1 Each logical volume with a Lisp directory on it serves as a directory of the device {DSK}. Files are referred to as {DSK}FileName Thus the file Init.Lisp on the volume LispFiles would be called {DSK}Init.Lisp. In addition, you can indicate subdirectories using the > character in file names to delimit subdirectory names. Subdirectories allow you to group files to a finer degree of granularity. Files with subdirectories are written {DSK}SubDir1>...>SubDirN>FileName For example, suppose you had a file LRdesign.TEdit on the subdirectory ParserGenerator on the subdirectory Compiler on the directory (logical volume) LispFiles of the hard disk device. Its name would be written as follows: {DSK}Compiler>ParserGenerator>LRDesign.TEdit. You can default directory names for the 1108 hard disk in an unusual but simple way. That is, if the file does not have a subdirectory and you leave out the directory (logical volume) name, the directory defaults to the next logical volume that has a Lisp directory on it, including or after the volume containing the currently running virtual memory. Thus if your disk has the logical volumes Lisp, Tajo, and LispFiles, and the Lisp volume contains the running virtual memory, and only the LispFiles volume has a Lisp directory on it, then {DSK}Init.Lisp refers to the file {DSK}Init.Lisp. All the utility functions presented above default logical volume names in a similar way, except for those that can't, such as CREATEDSKDIRECTORY. If you want to find out what the default Lisp directory is, call (DIRECTORYNAME '{DSK}) This defaulting convention is necessitated by several parts of the Interlisp system that create scratch files on the device {DSK} without specifying a directory (logical volume). 2 Disk Scavenging 1 The Koto release provides a disk scavenging service to help you recover from the unlikely event of file system failure. There are two classes of file system failure: Lisp directory failure and lower-level, Pilot operating system failure. Scavenging for Lisp directories can be performed by using SCAVENGEDSKDIRECTORY; scavenging for Pilot is provided by the System Tool. Lisp directory failures show up as infinite looping or other aberrant behavior while the system is doing a directory search or enumeration. To repair the directory, return to the top level and call (SCAVENGEDSKDIRECTORY VOLUMENAME) [Function] This function deletes the old directory, then reconstructs it from the files on the given logical volume. Pilot failures manifest themselves as "HARD DISK ERROR" breaks within Lisp. To fix such a failure, return to the top level, log out of Lisp and get into the System Tool (see chapter 6, System Tools for more information.) Invoke the Scavenge! command for the damaged logical volume. If the System Tool reports that there were no problems, proceed back to Lisp and call SCAVENGEDSKDIRECTORY as described above. On the other hand, the System Tool may report problems. Each problem is described by a message in the format shown below: [fileID] type = file type; problem description The fileID is a pair of numbers separated by a comma. The file type is a single number. If it is in the range 10048 to 10077 inclusive, the damaged file belongs to the Lisp local file system. Any other file types may be safely ignored. If the file is in the Lisp local file system, you should examine the problem description to determine your next course of action. There are five possible problems. unreadable pages [first...last plus one) 1. This indicates a hardware problem. You should run the disk diagnostics and probably have the pages marked bad. missing pages [first..last plus one) 2. Some of the file pages have not been allocated correctly. You will probably see this after getting VERIFY ERRORS in Lisp. duplicate page found 3. Self-explanatory orphan page found 4. The scavenger found an allocated disk page that it believes belongs to no allocated file. unknown problem 5. This is a catch-all for cases not covered by the previous four. Return to the top level (Interlisp-D Executive) and call SCAVENGEDSKDIRECTORY from Lisp unless case 1 or 2 reported that page 0 of a file was damaged. If the only problems were of class 3 or 4, you should be able to resume normal operation. In cases 1, 2, and 5 we recommend that you copy the files from the local disk to floppies or a file server, then erase the volume using the System Tool's Erase! command. Do not attempt to access the damaged files in any way. The function FILENAMEFROMID will let you translate from Pilot file ID's into file names. (FILENAMEFROMID LOWHALF HIGHHALF VOLUMENAME) [Function] This function take a Pilot file ID, as printed by the Scavenger and tries to find that file in the Lisp directory of the given volume, returning a string with the file name if successful, NIL otherwise. Note that the Pilot scavenger prints file IDs in octal. If you have any doubt about which logical volumes to scavenge, scavenge them all. The scavenger does not harm an intact volume.(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC ) STARTINGPAGE# 29) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (180 204 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (144 216 468 36) NIL) (TEXT NIL NIL (144 228 324 528) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (144 204 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (144 216 468 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (144 756 468 36) NIL) (TEXT NIL NIL (144 228 324 510) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (180 204 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (144 216 468 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (144 756 468 36) NIL) (TEXT NIL NIL (144 228 324 510) NIL)))))2llDlDT)D"T1llD lD1llDlD1`lDlD.TTD D.TTD D1`lDlD.TTDDED DJ PAGEHEADING VERSOHEADED DJ PAGEHEADING RECTOHEAD(TTD(DH(D"(TTD EDDJ PAGEHEADING VERSOHEADEDDJ PAGEHEADING RECTOHEAD;D PAGEHEADINGFOOTINGV;D PAGEHEADINGFOOTINGR1TTDDJ1TTD DJ(D(D MODERN MODERN MODERN MODERNMODERN MODERN MODERNMODERNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERNm HRULE.GETFNMODERN  HRULE.GETFNMODERNQª f … HRULE.GETFNMODERN  HRULE.GETFNMODERN S ?    T U    ¹ U    E  C    <     e  h   DQ7   ä x HRULE.GETFNMODERN  HRULE.GETFNMODERNv  ] â / à 9 1  ² HRULE.GETFNMODERN  HRULE.GETFNMODERN R }¹ # "  ‘)s$~^CŒš’)Çäzº