1. Field of the Invention
The present invention relates generally to data storage systems, and more particularly to network file servers. The present invention specifically relates to a network file server in which file access is shared among a number of processors by granting file locks and distributing file metadata to the processors.
2. Description of the Related Art
Mainframe data processing, and more recently distributed computing, have required increasingly large amounts of data storage. This data storage is most economically provided by an array of low-cost disk drives integrated with a large semiconductor cache memory.
In a network environment, at least one data mover computer is used to interface the cached disk array to the network. The data mover computer performs file locking management and mapping of the network files to logical block addresses of storage in the cached disk array, and moves data between network clients and the storage in the cached disk array.
In relatively large networks, it is desirable to have multiple data mover computers that access one or more cached disk arrays. Each data mover computer provides at least one network port for servicing client requests. Each data mover computer is relatively inexpensive compared to a cached disk array. Therefore, multiple data movers can be added easily until the cached disk array becomes a bottleneck to data access.
Unfortunately, data consistency problems may arise if concurrent client access to a read/write file is permitted through more than one data mover. These data consistency problems can be solved in a number of ways. For example, as described in Vahalia et al., U.S. Pat. No. 5,893,140 issued Apr. 6, 1999, entitled “File Server Having a File System Cache and Protocol for Truly Safe Asynchronous Writes,” incorporated herein by reference, locking information can be stored in the cached disk array, or cached in the data mover computers if a cache coherency scheme is used to maintain consistent locking data in the caches of the data mover computers.
A file server may use a file manager to manage file locks and file metadata for an assigned file system. In this case it is possible for the file manager to delegate certain metadata management tasks to another processor or to a trusted client. By delegating these metadata management tasks, there is a reduction in the amount of data traffic with the file manager when accessing the metadata of the assigned file system. This is especially advantageous for avoiding peak load conditions when the file manager might concurrently receive a large number of requests for locks and metadata.
In accordance with one aspect of the invention, there is provided a method of operating a primary data processor and a secondary data processor for access to a file system in data storage. The method includes the primary data processor managing locks upon files in the file system, and managing allocation of free blocks of the file system. The method further includes appending new data to a file in the file system by the secondary data processor obtaining an allocation of at least one free block from the primary data processor, the secondary data processor writing the new data to the free block, the secondary data processor obtaining a lock on the file from the primary data processor, and the secondary data processor updating metadata of the file.
In accordance with another aspect of the invention, there is provided a method of operating a primary data processor and a secondary data processor for access to a file system in data storage. The method includes the primary data processor managing locks upon files in the file system, and managing allocation of free blocks of the file system. The method further includes the secondary data processor appending new data to a file in the file system by obtaining an allocation of at least one free block from the primary data processor, writing the new data to the free block, obtaining a lock on the file from the primary data processor, and linking the free block to the file.
In accordance with still another aspect, the invention provides a storage system. The storage system includes data storage containing a file system, a primary data processor linked to the data storage for access to metadata of the file system for locking files of the file system and allocating free blocks in the file system, and a secondary data processor linked to the data storage for access to data and metadata of the file system over a data path that bypasses the primary data processor, and linked to the primary data processor for requesting and obtaining locks on the files in the file system and requesting and obtaining allocations of free blocks in the file system. The secondary processor is programmed for writing data to a specified file in the file system by obtaining an allocation of at least one free block from the primary data processor, writing data to the free block, obtaining a lock on the specified file from the primary data processor, and appending the free block to the specified file by writing new metadata for the specified file to the file system in the data storage over the data path that bypasses the primary data processor.
Other objects and advantages of the invention will become apparent upon reading the following detailed description with reference to the accompanying drawings wherein:
While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof have been shown in the drawings and will be described in detail. It should be understood, however, that it is not intended to limit the invention to the particular forms shown, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the scope of the invention as defined by the appended claims.
Referring to
The file manager 21 manages locking information for the files in the file system 22. The locking information is stored in the cached disk array 23, and the file manager 21 maintains a cache memory of recently accessed locking information and other related metadata.
As shown in
Before reading or writing to the file system 22, a client first issues a request for a lock to the file manager 21. The file manager 21 responds by placing a lock on the file to be accessed, and returning metadata including at least one pointer to where the data or additional metadata to be accessed is stored in the file system. The client uses the pointer to formulate a read or write request sent over the bypass data path to the file system 22.
With reference to
In
The first file manager 31 is connected to the first cached disk array 35 for the communication of metadata of the first file system 33, and the second file manager 32 is connected to the second cached disk array 36 for the communication of metadata of the second file system 34. The first file manager 31 is connected to the second file manager 32 for the communication of metadata and control information with respect to the first file system 33 and the second file system 34. The first file manager 31 is linked to a first client 38 for the communication of metadata and control information with respect to the first file system 33 and the second file system 34. The second file manager 32 is linked to a second client 39 for the communication of metadata and control information with respect to the first file system 33 and the second file system 34.
The first client 38 has a bypass data path 42 to the first file system 33 for bypassing the first file manager 31, and a bypass data path 43 to the second file system 34 for bypassing the first file manager 31 and also bypassing the second file manager 32. The second client 39 has a bypass data path 44 to the first file system 33 for bypassing the first file manager 31 and the second file manager 32, and a bypass data path 45 to the second file system 34 for bypassing the second file manager 32.
The first client 38 accesses the first file system 33 in the fashion described above with respect to
In a similar fashion, the second client 39 accesses the second file system 34 in the fashion described above with respect to
In the storage network of
The file system management method introduced in
In the data storage networks of
In a file server of the kind that uses a file manager to manage locks for an assigned file system, it is possible for the file manager to delegate certain metadata management tasks to another file manager or to a trusted client. By delegating these metadata management tasks, there is a reduction in the amount of data traffic with the file manager when accessing the file system owned by the file manager. This is especially advantageous for avoiding peak load conditions when the file manager might concurrently receive a large number of requests for locks.
With reference to
With reference to
With reference to
In the network file server 110 of
In a preferred implementation, the file system owner delegates the task of metadata management in order to permit a client, secondary file manager or secondary data mover to modify metadata of a file or directory in the on-disk file system. For example, the metadata of a file may be changed during an append or truncation of a file, and the metadata of a directory may be changed during the creation or deletion of a file in the directory. In order to delegate these tasks, the file system owner not only grants locks upon the file or directory to a client, secondary file manager or secondary data mover, but also “leases” inodes and blocks of the file system to the client, secondary file manager or secondary data mover.
The primary data mover or file manager 140 manages leasing of the free blocks 144 and free inodes 145 to the secondary data mover or client 141. In response to a lease request for free blocks or free inodes, the primary data mover or file manager 140 allocates a number of the free blocks 144 or free inodes 145 to the secondary data mover or client 141, and returns to the secondary a list of pointers (block numbers or inode numbers) to the leased blocks and inodes. For lease management, the primary 140 maintains leasing information 148 including a pointer to a next free block 144 not yet leased or allocated, and a pointer to a next free inode 146 not yet leased or allocated. For recovering from a “crash” or failure of the secondary data mover or client 141, the leasing information 148 may also include a log of the leased blocks and inodes and the lease holders.
The primary data mover or file manager 140 also manages the granting of locks on files and directories to the secondary data mover or client 141. The primary data mover or file manager 140 maintains locking information 149 identifying the locked file system objects and lock holders. The locking information may also include, for each locked object, a list of outstanding requests for a conflicting lock.
In operation, the secondary data mover or client 141 maintains a list 150 of pointers to leased free blocks, and a list of pointers 151 to leased free inodes. When the list 150 or 151 is nearly empty, or when the secondary 141 needs more pointers to free blocks or inodes for the delegated metadata management, the secondary 141 sends a lease request to the primary data mover or client 140 to obtain more pointers.
When the secondary data mover or client 141 needs to read or write to a directory or file in the file system 143 owned by the primary data mover or file manager 140, the secondary 141 first sends a lock request to the primary 140. The lock request, for example, specifies the path name of the file or directory, and the type of access (read-only or read-write). The primary data mover or file manager 140 does a file system lookup on the path name of the directory or file in order to find the directory block entry (see 57 in
For certain write operations, the secondary data mover or client 141 may change the metadata in the directory or file inode in the on-disk file system 143, without writing the new metadata to the primary data mover or file manager 140. If the primary data mover or file manager 140 keeps a local cache of the directory or file inode, then the directory or file inode in that local cache should be invalidated when the primary 140 grants a write lock on the directory or file inode to the secondary data mover or client 141. Therefore, if and when the primary data mover or client manager 140 would later need to access the directory or file inode, the primary 140 would first check that there is no conflicting lock on the directory or file inode, and then grant itself a lock on the directory or file inode, and then refresh its local cache by fetching the directory or file inode from the on-disk file system 143. In this fashion, new metadata from the secondary data mover or client 141 is written to the cached disk array 142 and transferred to the primary data mover or file manager 140. Because of the “fast write” capability of the cached disk array (i.e., data written to the cache of the cached disk array is considered to be in the on-disk file system 143 before the data is actually written to disk of the cached disk array), there can be a very rapid transfer of metadata through the cached disk array 142 from the secondary data mover or client 141 to the primary data mover or file manager 140.
For certain write operations, the delegated metadata management alters the structure of the file system by adding blocks or inodes. For extending a directory or file, the secondary data mover or client 141 removes one of the pointers from the list 150 to obtain the block number of a free block to become the block appended to the directory or file. The secondary data mover or client 141, for example, transfers the free block from the pool of free blocks 144 in the on-disk file system 143 and links it into the file system data structure of allocated inodes 147. For creating a new directory or a new file, the secondary data mover or client 141 removes one of the pointers from the list 151 to obtain the inode number of a free inode to become the inode of the new directory or new file. The secondary data mover or client 141, for example, transfers the free inode from the pool of free inodes 145 in the on-disk file system 143 and links it into the file system data structure of allocated inodes 147 in the on-disk file system.
In step 163, the secondary receives the block numbers and inode numbers of the leased set of free blocks and free inodes of the file system. Some time later, in step 164, the secondary receives a request from a client or application program instance for access to an object (such as a directory or file) in the file system. Execution continues from step 164 to step 165 in
In step 165 in
After step 169, execution loops back to step 161 of
In a first step 201 of
In view of the above, there has been described a method of delegation of metadata management in a file server or storage network from a primary data processor to a secondary data processor in order to reduce data traffic between the primary data processor and the secondary data processor. The primary data processor retains responsibility for managing locks upon objects in the file system that it owns, and also retains responsibility for allocation of free blocks and inodes of the file system. By leasing free blocks and inodes to the secondary and granting locks to the secondary, the secondary can perform the other metadata management tasks such as appending blocks to a file, truncating a file, creating a file, and deleting a file.
It should be understood that the preferred embodiment as described above can be modified in various ways without departing from the scope of the invention as defined by the appended claims. For example, it is not necessary to delegate all of the metadata management functions described above to the secondary. Depending on the margin of loading of the primary to secondary data path relative to the margin of loading of the secondary to storage data path, some but not all of the metadata management functions may be delegated in order to balance the margin of loading of the data paths. For example, in a particular file server configuration, it may be desirable to delegate only the “append to a file” and “truncate a file” functions. This provides a modest decrease in loading of the primary to secondary data path, and a low level of implementation complexity, because the primary need not lease inodes.
The present application is a continuation of Xiaoye Jiang et al. U.S. Ser. No. 10/116,369 filed Apr. 4, 2002, now U.S. Pat. No. 7,010,554 published as US-2003-0191745-A1, incorporated herein by reference. The present application also is a continuation-in-part of Uresh K. Vahalia et al. U.S. Ser. No. 09/261,621 filed Mar. 3, 1999 now U.S. Pat. No. 6,973,455.
Number | Name | Date | Kind |
---|---|---|---|
4780821 | Crossley | Oct 1988 | A |
5175852 | Johnson et al. | Dec 1992 | A |
5226159 | Henson et al. | Jul 1993 | A |
5394526 | Crouse et al. | Feb 1995 | A |
5537645 | Henson et al. | Jul 1996 | A |
5541925 | Pittenger et al. | Jul 1996 | A |
5675802 | Allen et al. | Oct 1997 | A |
5734898 | He | Mar 1998 | A |
5737747 | Vishlitzky et al. | Apr 1998 | A |
5774660 | Brendel et al. | Jun 1998 | A |
5828876 | Fish et al. | Oct 1998 | A |
5852747 | Bennett et al. | Dec 1998 | A |
5893086 | Schmuck et al. | Apr 1999 | A |
5893140 | Vahalia et al. | Apr 1999 | A |
5933603 | Vahalia et al. | Aug 1999 | A |
5944789 | Tzelnic et al. | Aug 1999 | A |
5950203 | Stakuis et al. | Sep 1999 | A |
5974424 | Schmuck et al. | Oct 1999 | A |
5987477 | Schmuck et al. | Nov 1999 | A |
6023706 | Schmuck et al. | Feb 2000 | A |
6032216 | Schmuck et al. | Feb 2000 | A |
6061504 | Tzelnic et al. | May 2000 | A |
6085234 | Pitts et al. | Jul 2000 | A |
6161104 | Stakutis et al. | Dec 2000 | A |
6167446 | Lister et al. | Dec 2000 | A |
6173293 | Thekkath et al. | Jan 2001 | B1 |
6185601 | Wolff | Feb 2001 | B1 |
6192408 | Vahalia et al. | Feb 2001 | B1 |
6212640 | Abdelnur et al. | Apr 2001 | B1 |
6230190 | Edmonds et al. | May 2001 | B1 |
6324581 | Xu et al. | Nov 2001 | B1 |
6453354 | Jiang et al. | Sep 2002 | B1 |
6493804 | Soltis et al. | Dec 2002 | B1 |
6697846 | Soltis | Feb 2004 | B1 |
6973455 | Vahalia et al. | Dec 2005 | B1 |
7010554 | Jiang et al. | Mar 2006 | B2 |
Number | Date | Country | |
---|---|---|---|
20050240628 A1 | Oct 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10116369 | Apr 2002 | US |
Child | 11168136 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09261621 | Mar 1999 | US |
Child | 10116369 | US |