0

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.

  • 1
    Is your Windows machine a VM, and if so, which hypervisor are you using? Is this LUN dedicated to a single virtual disk that is configured on the VM? Once you are clear on what the layout of your storage is, you'll need to perform several tasks: (1) shrink the Windows volume (your F: drive), then (2) shrink the VMDK (if virtual), then shrink the LUN and/or datastore in order to reduce the amount of your billable used storage. – SturdyErde Jul 16 '18 at 15:49
  • Thanks for super quick response and for great suggestion. Our VM guy might have something similar, because it worked for him(storage portal actually showed reclaimed space). I am testing with real Physical machine, now doing similar test actually with F: drive on Windows VM. Formatting F: drive did not help on Physical machine either. – Makhu Jul 16 '18 at 15:57
  • 1
    The problem that I think you'll run into is that as long as Windows has a 500 GB volume mounted and formatted, all 500 GB of your space on the LUN will be marked as allocated. Have you tried resizing the Windows volume and then revisiting the watermark on the LUN? – SturdyErde Jul 16 '18 at 16:00
  • Thank you @SturdyErde again. I did shrink by 1GB and offline/online the F: drive. Shows correctly in Win Explorer by 1GB less. Disk Mgmt shows 1GB unallocated volume, storage portal continues to shoiw 300GB allocated/used. – Makhu Jul 16 '18 at 16:21
  • 1
    Open up Windows Defrag and make sure the drive is listed as a "Thin provisioned volume" there. If it is, click the Optimize button. This will discard all unused space (instead of defragmenting). If it is not listed as a thin provisioned volume, talk to your storage admin. – Michael Hampton Jul 16 '18 at 20:57
1

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.

  • Thanks a lot @Yagmoth555 for detailed response, appreciate it. Agreed that Sdelete/Diskpart will not solve the purpose in this case. We are locked in with the Storage vendor, no way to change that in near future. Changing chargeback method can be last resort. Will check if thick provisioning option is on the Storage strategy. – Makhu Jul 16 '18 at 22:19
0

Thank you all for the comments. Here's the 2 stage process.

  1. Use SDELETE from Windows side to zero the deleted pages.
  2. Run Zero page process from Storage side to actually reclaim zero'd pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.