Thin Lun Reclamation using sDelete.exe

Thin luns are all the rage now in storage, and rightly so.  It will allow you to present the amounts of storage that your applications request, but only provision on what they actually use.  As a server uses space on their luns, the storage array will provision the needed space from the disk pools/CPGs or other disk grouping that your array uses.  Windows 2012 R2 will use UNMAP commands to zero out the empty space on the disk to reclaim the space, but previous version of Windows do not.  Fortunately, we have a tool to use to zero out the empty space, called sdelete.exe.

When a user deletes a file from a disk, it really just removes the entry in the disk table of contents or MTF bitmap of the file system.  The actual data of the file still exists on the drive.  This is great if you need to recover the file using some sort of undelete file, but not great if you want to reclaim disk space from your storage array.  Windows 2012 R2 is smart enough to zero out deleted data in order to allow storage arrays to pick up on the free space to start their own reclamation process. Earlier version of Windows, you need to zero out the free space on your own.  This is where sDelete.exe comes in

This tool, available at the URL above, will zero out empty space on the disk.  This can be accomplished by running the following.

sDelete.exe -z f:

This command will take all of the empty space and write zeros to them. As one can imagine, this can take some time on large volumes.  What this is doing in the background is taking all of the deleted data that is unmapped and then writing zeroes over this space.  The disk will look like data was never on that part of the volumes anymore.

Depending on your storage array, space may start to be reclaimed over time, or you may need to initiate the reclamation of space.  In a VNX series array, a lun migration from one pool to another will reclaim the space.  A 3Par will slowly recover the space, but if time is of the essence, you can tune the VV to another CPG to reclaim the space.