Windows – Reclaim deleted space on SAN from thin provisioned LUN with zeros on Windows

cipherstoragestorage-area-networkwindows

Dear Data Storage Experts,

We are using a SAN attached thin-provisioned LUN on Physical Windows machine from a storage vendor. Storage chargeback is based on high watermark (deleted space not reclaimed properly).

Consider following scenario:

  • 500GB LUN attached to Windows as F:
  • Case 1) We fill the F: drive to 99% with data, Vendor storage portal will say ~500GB used and we get charged for 500GB.
  • Case 2) We delete all of the data on F:, Vendor storage portal will still say ~500GB used(high watermark) and get chargeback for 500GB.

Heard that writing zeros to the deleted space will actually reclaim the space for thin provisioned device. I tried using sdelete, cipher, fsutil to confirm the binary zeros are written to the deleted space. Vendor portal is still showing ~500GB used. Followed this link but no luck.

How to zero fill a virtual disk's free space on windows for better compression?

Really appreciate any help on this.

Edit 1 : SCSI_UNMAP looks interesting. Changing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\DisableDeleteNotification to 1 might solve this issue but can be performance heavy. Checking such options now, thanks again for reading my post.

Best Answer

The sdelete tip work more for a vdisks/vhd. sdelete will indeed write 0 over all your partition for erased file and empty space, but keep in mind that the action will make your partition grow to 100% of your image at first, as after you would need to issue a diskpart compact, the command will remove those '0' from the file itself, but in your case if a volume, that tip don't work.

You would need to check the SAN vendor documentation, but at this point it's a job for your hoster, not you. To give an example, on some Dell SAN I used to set the volume to thick, remove all snapshot and switch back to thin after, but it's all a setup done at the storage, which you pay for.

I would maybe stay in thick after if it's a storage that change a lot, your bill will be always the same.