Table of ContentsView in Frames

Space Reclamation

In a thinly provisioned environment, space reclamation completes the process of freeing space from the storage system that has been freed in the host file system.

A host file system contains metadata to keep track of which blocks are available to store new data and which blocks contain valid data and must not be overwritten. This metadata is stored within the LUN. When a file is deleted in the host file system, the file system metadata is updated to mark that file's blocks as free space. Total file system free space is then recalculated to include the newly-freed blocks. To the storage system, these metadata updates appear no different than any other writes being performed by the host. Therefore, the storage system is unaware that any deletions have occurred.

This creates a discrepancy between the amount of free space reported by the host and the amount of free space reported by the underlying storage system. For example, suppose you have a newly-provisioned 200 GB LUN assigned to your host by your storage system. Both the host and the storage system report 200 GB of free space. Your host then writes 100 GB of data. At this point, both the host and storage system report 100 GB of used space and 100 GB of unused space.

Then you delete 50 GB of data from your host. At this point, your host will report 50 GB of used space and 150 GB of unused space. However, your storage system will report 100 GB of used and 100 GB of unused space. The blocks containing the 50 GB of data deleted by the host are not freed on the storage system until they are reclaimed through space reclamation.

One supported method of reclaiming space is built into SnapDrive for Windows. The SnapDrive implementation of space reclamation, called SpaceReclaimer, is a process that runs on the host. Each block in the file system is examined and compared against the corresponding block in the storage system. If the space reclamation process finds a block that is marked as free in the host file system, but not free in the storage system, the space reclamation process issues a special SCSI command to the storage system identifying which block can be freed. After the process has completed, the amount of free space reported by the host and the amount of free space inside the LUN as reported by the storage system will be identical.

Space Reclamation Diagram