Reduce Storage Costs
by Reclaiming Disk Space
By Richard Jooss
Using the storage space you already own more efficiently can be a great way to get control of your storage environment and reduce your storage expenditures. NetApp has pioneered a variety of technologies designed to reduce data management overhead and limit the amount of storage you need:
- Space–efficient Snapshot™ copies
- FlexClone® technology to clone storage volumes without using 2X the disk capacity
- Thin provisioning options that reduce the amount of storage you need to allocate up front
- A–SIS deduplication technology that eliminates duplicate copies of data blocks within any NetApp storage volume
This article examines a relatively new NetApp technology–space reclamation–that helps you conserve and re–use the disk space you've already allocated to LUNs in Windows® environments. NetApp is the only vendor to offer this capability.
Understanding Space Reclamation
To understand space reclamation, you have to remember that when you assign a LUN to a host, the host creates its own file system on the LUN and does its own bookkeeping. As a result, the host can have a very different idea of how much space it is currently using within the LUN than the storage system has. (This applies equally to all SAN storage vendors, not just NetApp.)

Figure 1) How host and storage views of space usage get out of sync in reclaiming space.
You'll want to refer to Figure 1 during the following explanation. Consider a new LUN that has been allocated to a host. In Step #1 we write two new files, each consuming 25% of the LUN. Both the host and storage report that 50% of the space has been used, as expected. If we add a third file of the same size (Step #2), again the host and storage report the same utilization.
But now suppose we delete the first two files as shown in Step #3. Remember that with most file systems (including NTFS), deleting a file causes the file system to deallocate the blocks and put them on a free block list. Nothing happens to notify the storage system that anything occurred. The data stored inside the LUN is opaque to the storage system. Hence, the views of the host and the storage system suddenly diverge. The host reports that the file system is only 25% full while the storage system believes that 75% of the LUN is in use.
The host is under no obligation to re–use the blocks it just freed, so if another large file is subsequently written to the LUN, it may occupy previously unused space, as shown in Step #4. The storage system now thinks the LUN is full, while the host shows just 50% utilization.
These discrepancies don't really pose a problem in situations in which you've dedicated a LUN of fixed size to an application. But there are two places where it matters:
- Thin provisioning. If you use thin provisioning, there's a big potential difference on the storage system between a LUN that is considered 25% full and one that is 75% full.
- Suppose your LUN is 2TB in size. In this example, that would be equivalent to a full TB of storage you could use someplace else.
- In the worst case, if you have a thinly provisioned volume configured to "autogrow" on your storage system and the storage system shows the volume as full, it could allocate additional space even though the host view of the LUN shows plenty of free space.
- Snapshot copies. Guess what? If the storage system doesn't know the blocks allocated to deleted files aren't actually in use, it's going to preserve them in Snapshot copies. Over time you may need more storage space for your Snapshot copies (a larger snapreserve, as it's called at NetApp).
Reclaiming the Unused Space in a LUN
At this point, you can see that there are advantages to reclaiming storage space. When space reclamation starts, an agent on the host determines which blocks on a LUN are not in use by NTFS. The host agent then communicates this information to the storage system and WAFL® marks the blocks as free. Once the blocks are freed by the storage system, they are no longer retained when Snapshot copies are made. If thin provisioning has been enabled, the space is once again available for use by other LUNs.
Without space reclamation, it is almost impossible to thin provision a LUN over a long period of time. Naturally, this depends on how the particular application uses storage space, but in general the storage system tends to allocate more and more of the space until the LUN reaches its maximum size, at which point it is the same as if you provisioned the LUN normally. Figure 2 illustrates how space reclamation recovers the space.

Figure 2) Effect of space reclamation on LUN space usage.
Space reclamation may be particularly useful in any environment that shows a large variance in the amount of data used. Systems used for queuing print jobs, e–mail, or standard file sharing are excellent candidates for space reclamation on a periodic schedule. Any system that has gone through a major change is also a good candidate for space reclamation. If you've performed database reorganization or made significant changes to a database because of archiving, space reclamation will likely recover a significant amount of data.
Getting Started with Space Reclamation
NetApp space reclamation technology has been integrated into NetApp SnapDrive® for Windows 5.0 and comes at no additional cost. SnapDrive makes it easy for Windows server administrators to manage NetApp SAN storage using either a wizard–based approach or through a command–line interface (SDCLI) that can be used in conjunction with management scripts and scheduling programs.
Using the SnapDrive GUI or SDCLI, you can periodically initiate the space reclamation process on your LUNs. The GUI tool will first determine how much space can be reclaimed and ask if you wish to continue. You can limit the amount of time the process will use to ensure that it does not run during peak periods.
Here are a few things to keep in mind when you run space reclamation:
- It's a good practice to run space reclamation before creating a Snapshot copy. Otherwise blocks that should be available for freeing will be locked in the Snapshot and not able to be freed.
- Because space reclamation initially consumes cycles on the host, it should be run during periods of low activity.
- Normal data traffic to the LUN can continue while the process runs. However, certain operations cannot be performed during the space reclamation process:
- Creating or restoring a Snapshot copy stops space reclamation.
- The LUN may not be deleted, disconnected, or expanded.
- The mount point cannot be changed.
- We don't recommend running Windows defragmentation.
Get More from Your Storage
With space reclamation, NetApp gives you a new tool to further increase storage efficiency. Space reclamation makes it possible to efficiently thin provision your block–based LUNs for long periods of time without having LUN space allocation slowly creep up to 100%. It also increases the efficiency of Snapshot copies on your LUNs, reducing the amount of space you need to reserve for this important function.