The management of multiple-client systems can be simplified if the systems are kept in a consistent state. One method for doing this is to store master files (e.g., operating system and application files) on one machine and share these files with all of the clients in the system. File-sharing systems operating in accordance with this method generally fall into two categories.
In the first category, files may be read and written by all systems sharing the files. Examples of these types of systems include Single System Image (SSI) and cluster-wide file systems. Because all clients share the same file image, clients cannot customize files for their particular needs. Also, corruption of a file by one client corrupts the file for all other clients.
In the second category, a remote system tracks, and separately stores, changes that individual systems make to remotely shared files. One example of this type of file system is Hewlett-Packard Company's context dependent file system (CDFS).
In one embodiment of the present invention, a driver is used to filter read requests initiated by a client computer. If a file that is the subject of a read request is referenced by a local file system of the client computer, the driver routes the read request to the local file system. If a file that is the subject of a read request is not referenced by the local file system, the driver routes the read request to a remote file system. All requests to write files of the remote file system are routed to the local file system, thereby causing a file that is the subject of such a request to be written to the local file system.
Another embodiment of the present invention comprises a plurality of client computers, each of which maintains a local file system for accessing local files. A remote machine providing access to remote files is also provided. Each client computer is further provided with a driver to i) filter read requests initiated by the client computer, ii) route a read request to the local file system of the computer when a file that is the subject of the read request is maintained in the local files of its client computer, and otherwise route the read request to a remote file system for accessing the remote files, and iii) route to the local file system of the client computer, all requests to write the remote files.
Other embodiments of the invention are also disclosed.
Illustrative embodiments of the invention are illustrated in the drawings in which:
Exemplary apparatus for routing file access requests to remote and local file systems is shown in
Each client 100, 110 maintains a local file system 104, 114, and a remote file system 106, 116. Local file system 104 accesses local files 108. In a similar fashion, local file system 114 accesses local files 118. Local files 108, 118 may be files residing on a disk device or other type of storage device that may be part of the associated client 100, 110, or locally accessible to the associated client. The remote file systems 106, 116 are used to access remote files 122 associated with the remote machine 120. By way of example, the remote file system may be a UNIX file system such as Sun Microsystem Corporation's network file system (NFS) or Hewlett-Packard Company's distributed file system (DFS), or a LINUX file system.
Each client 100, 110 also has a file system driver 102, 112. In one embodiment, the file system drivers 102, 112 are embodied in software installed on the clients 100, 110. The file system drivers 102, 112 may be layered on top of existing file system drivers, and may utilize the inherent remote access and file management capabilities of the existing file system drivers. Thus, the file system drivers 102, 112 need not understand, nor intrude on, operating system kernels of the clients 100, 110. This may alleviate overhead and provide for faster access to files. Additionally, each file system driver 102, 112 may present a uniform view of the files referenced by its corresponding local file system 104, 114 and remote file system 106, 116. In this manner, the location of the file accessed is transparent to the user or application accessing the file.
As will be described in detail below, each file system driver 102, 112 may be used to filter file access requests and route them to the appropriate file system, either local or remote. In some embodiments, the filtered access requests are limited to read requests; and in other embodiments, the filtered access requests comprise both read and write requests. The filtered access requests can also be limited to requests to access certain types of files (e.g., operating system files or configuration files).
Next, the read request is routed 210 to either the local or remote file system. This process will be described in further detail with reference to
Optionally, either before or after the file is accessed, a determination 320 may be made as to whether the file is of a predetermined type for which it would be desirable to write the file to the local file system 104. By way of example, the “predetermined type” may be operating system files, configuration files, and/or another type of file that might be better accessed via the local file system 104 for performance or other reasons. If it is determined that a file is of the predetermined type, the file is written 325 to the local file system 104, and all further requests to read the file are routed to the local file system 104 instead of the remote file system 106. Otherwise, a return may be made to the method of
In one embodiment, the remote machine 120 may keep track of which files are of the predetermined type. In an alternate embodiment, the remote machine 120 may automatically write the files of a predetermined type to the local file system 104, regardless of whether the client 100 has attempted to access them (i.e., the files of a predetermined type may be “pushed” to the client 100). Pushed files, however, should be limited to files that are not subject to update within the local file system 104; or prior to pushing a file, steps may need to be taken to preserve any local modifications that have been made to a version of the file that is already being maintained by the local file system 104.
Returning to
By routing all write requests to the local file system 104, the consistency of the remote files 122 may be preserved so that other clients 110 may access a “clean” or “master” image of the remote files 122. If a client needs to modify or write one of the remote files 122, the client writes the modified file to its local file system 104. By way of example, clients may store operating system configuration files or other types of configuration files locally. Future access requests for these locally-stored files are then directed to the client's local file system. Other clients that have not written the files locally still access the master files on the remote machine. Thus, files on the remote machine are kept in a consistent state, but each client is still able to modify the files to meet its individual needs.
It should be appreciated that the methods described herein may be implemented by sequences of instructions 400 stored on one or more computer-readable mediums 402. See