Maintenance of a file version set including read-only and read-write snapshot copies of a production file
First Claim
1. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, read-only snapshot copies of the production file, and at least one read-write snapshot copy of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file and an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file.
10 Assignments
0 Petitions
Accused Products
Abstract
Read-only and read-write snapshot copies of a production file in a Unix-based file system are organized as a version set of file inodes and shared file blocks. Version pointers and branch pointers link the inodes. Initially the production file can have all its blocks preallocated or it can be a sparse file having only an inode and its last data block. A protocol is provided for creating read-only and read-write snapshots, deleting snapshots, restoring the production file with a specified snapshot, refreshing a specified snapshot, and naming the snapshots. Block pointers are marked with a flag indicating whether or not the pointed-to block is owned by the parent inode. A non-owner marking is inherited by all of the block'"'"'s descendants. The block ownership controls the copying of indirect blocks when writing to the production file, and also controls deallocation and passing of blocks when deleting a read-only snapshot.
365 Citations
53 Claims
- 1. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, read-only snapshot copies of the production file, and at least one read-write snapshot copy of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file and an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file.
-
29. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, read-only snapshot copies of the production file, and at least one read-write snapshot copy of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file and an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file, wherein the file server further includes:
-
means for creating new read-only snapshot copies of the production file;
means for creating new read-write snapshot copies of the production file;
means for deleting a specified snapshot copy of the production file from the version set;
means for restoring the production file with a specified snapshot copy of the production file;
means for refreshing a specified snapshot copy of the production file; and
means for naming the files in the version set.
-
-
30. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and read-only snapshot copies of the production file, wherein the production file and the read-only snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each read-only snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the read-only snapshot copies of the production file,
wherein the file server is programmed to maintain for each block in each snapshot copy of the production file an indication of whether or not said each snapshot copy of the production file is an oldest snapshot copy of the production file including an identical version of said each block, and wherein the file server is programmed to delete a read-only snapshot copy of the production file, and when deleting the read-only snapshot copy of the production file, to keep each block for which the read-only snapshot copy is not indicated as being an oldest snapshot copy of the production file including an identical version of said each block.
-
35. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file,
wherein the file server is programmed for responding to a request to create a read-only snapshot copy of the production file by reserving for the production file a number of free file blocks of at least the number of blocks in the production file.
-
38. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file,
wherein the file server is programmed for restoring the production file with a specified snapshot copy of the production file by responding to a request to prepare to restore the production file by preparing to restore the production file and reporting whether or not preparation is successful, and then responding a request to commit the preparation by restoring the production file with the specified snapshot copy of the production file.
-
40. A file server comprising storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file,
wherein the file server is programmed for refreshing a specified snapshot copy of the production file by creating a new inode in the version set, copying contents of the inode of the specified snapshot copy into the new inode so that the new inode references blocks of the specified snapshot copy, using the inode of the specified snapshot copy to create a new snapshot copy of the production file by copying contents of the inode of the production file into the inode of the specified snapshot copy, and performing a file deletion upon the new node.
-
42. A method of operating a file server, the file server including storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and read-only snapshot copies of the production file, wherein the production file and the read-only snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each read-only snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the read-only snapshot copies of the production file, wherein the method comprises:
-
maintaining for each block in each snapshot copy of the production file an indication of whether or not said each snapshot copy of the production file is an oldest snapshot copy of the production file including an identical version of said each block, and deleting a read-only snapshot copy of the production file, wherein the deleting of the read-only snapshot copy of the production file includes keeping each block for which the read-only snapshot copy is not indicated as being an oldest snapshot copy of the production file including an identical version of said each block. - View Dependent Claims (43, 44, 45, 46)
-
-
47. A method of operating a file server, the file server including storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file, wherein the method comprises:
the file server responding to a request to create a read-only snapshot copy of the production file, and when responding to the request to create a read-only snapshot copy of the production file, reserving for the production file a number of free file blocks of at least the number of blocks in the production file. - View Dependent Claims (48, 49)
-
50. A method of operating a file server, the file server including storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file, wherein the method includes:
the file server restoring the production file with a specified snapshot copy of the production file by responding to a request to prepare to restore the production file by preparing to restore the production file and reporting whether or not preparation is successful, and then responding a request to commit the preparation by restoring the production file with the specified snapshot copy of the production file. - View Dependent Claims (51)
-
52. A method of operating a file server, the file server including storage containing a file system, and a processor coupled to the storage for accessing the file system, wherein the file system includes a production file, and snapshot copies of the production file, wherein the production file and the snapshot copies of the production file are organized as a version set including an inode for the production file, an inode for each snapshot copy of the production file, and a set of file blocks including data blocks and indirect blocks that are shared among the production file and the snapshot copies of the production file, wherein the method comprises:
the file server refreshing a specified snapshot copy of the production file by creating a new inode in the version set, copying contents of the inode of the specified snapshot copy into the new inode so that the new inode references blocks of the specified snapshot copy, using the inode of the specified snapshot copy to create a new snapshot copy of the production file by copying contents of the inode of the production file into the inode of the specified snapshot copy, and performing a file deletion upon the new node. - View Dependent Claims (53)
Specification