Reclaiming space from a file system
AssigneeAmerican Megatrends, Inc.
InventorsParesh Chatterjee, Vijayarankan Muthirisavenugopal, Raghavan Sowrirajan
Life of this patent
Estimating the term…
Abstract
Technologies are provided for reclaiming a file system coupled to a block device. In these technologies, a dummy file is created. The dummy file is expanded to fill a volume in the block device. A mapping of the dummy file to locations in the volume is retrieved. When the mapping of the dummy file to the locations in the volume is retrieved, corresponding space in the volume is reclaimed. This space may include the locations in the volume corresponding to the mapping of the dummy file. When this space in the volume is reclaimed, the dummy file is deleted.
Claims20
A computer-implemented method for avoiding unnecessary read-modify-write operations in a storage system, comprising:
- writing a first file having a predetermined block size to a volume in a logical block;
- taking a snapshot of the volume, the snapshot including an image of the logical block;
- deleting the first file from the volume;
- marking the first file as unwritten or invalid;
- and
- writing a second file having a size less than the predetermined block size to the volume in the logical block, wherein the second file is written without performing a read-modify-write operation on data in the snapshot.
A non-transitory computer-readable medium having computer-executable instructions stored thereon for avoiding unnecessary read-modify-write operations in a storage system that, when executed by a storage computer, cause the storage computer to:
- write a first file having a predetermined block size to a volume in a logical block;
- take a snapshot of the volume, the snapshot including an image of the logical block;
- delete the first file from the volume;
- mark the first file as unwritten or invalid;
- and
- write a second file having a size less than the predetermined block size to the volume in the logical block, wherein the second file is written without performing a read-modify-write operation on data in the snapshot.
A computer-implemented method for replicating space reclamation information between a first storage computer and a second storage computer in a storage system, the method comprising:
- maintaining a volume with the first storage computer;
- maintaining a duplicate of the volume with the second storage computer;
- writing a first file having a predetermined block size to the volume in a logical block;
- taking a snapshot of the volume, the snapshot including an image of the logical block;
- deleting the first file from the volume;
- creating a temporary dummy file;
- expanding the temporary dummy file to fill at least a portion of the volume;
- identifying physical regions of the volume occupied by the temporary dummy file, wherein the physical regions include the logical block;
- marking the first file as unwritten or invalid in the volume;
- transmitting the identified physical regions including the logical block from the first storage computer to the second storage computer;
- and
- writing a second file having a size less than the predetermined block size to the volume in the logical block, wherein the second file is written without performing a read-modify-write operation on data in the snapshot.
A non-transitory computer-readable medium having computer-executable instructions stored thereon for replicating space reclamation information between a first storage computer and a second storage computer in a storage system that, when executed by the first storage computer, cause the first storage computer to:
- maintain a volume;
- write a first file having a predetermined block size to the volume in a logical block;
- take a snapshot of the volume, the snapshot including an image of the logical block;
- delete the first file from the volume;
- create a temporary dummy file;
- expand the temporary dummy file to fill at least a portion of the volume;
- identify physical regions of the volume occupied by the temporary dummy file, wherein the physical regions include the logical block;
- mark the first file as unwritten or invalid in the volume;
- communicate the identified physical regions including the logical block from the first storage computer to the second storage computer;
- and
- write a second file having a size less than the predetermined block size to the volume in the logical block, wherein the second file is written without performing a read-modify-write operation on data in the snapshot.
Dependencies are inferred from the claim text.