Wednesday, June 11, 2014

VSS and Mysteriously Lost Disk Space


Hi folks,

This tricky situation happened to me right after coming back to work place after long and wonderful weekend.

I have been reported by my colleagues that our customer is having issue that with the disk space. Database space was shrinking and for some databases it had reached threshold when it had to be split by 2 parts. As I started investigating this case I had the same though as they did and was ready to prep RFC for database rebuilding and mailbox moves.

However I discovered that free disk space is reported differently for mount point hosting 2 copies. One copy was reporting 48% of disk space while the other one 9%. This confused me especially after I didn't see anything special in the file structure even after hidden files were enabled. Not to mention, that LUN size for both database copies was absolutely the same, as my customer is pretty standardised.

Helpless, I went to my brother Google. And after some time I found this article which became that magic silver bullet to resolve my problem. It had quickly reminded me that we had backups failing for lengthy period of time (as you know since Exchange 2010 there's no more online backup APIs supported, only VSS). And these failed backups would not delete VSS snapshots they would have created.

This is an easy three-step solution what reveals and deletes all of the VSS copies that piled up in the storage.

First we launch the utility. As you understand it's quite obvious. You simply need to type diskshadow and hit Enter.

To type next 2 commands you will need capital letter (press CAPS LOCK or hold Shift button all the time you type them).

First we list if there are any shadow copies that were not removed by backups:

LIST SHADOWS ALL


After we discovered that there are any shadow copies sitting on your disk for a long time, which can be easily figured out by the date of each VSS snapshot, we delete all of them by running:

DELETE SHADOWS ALL


When done you will need to type exit to exit utility and then close Command Prompt.

I hope this article helpful as you solve this tricky and easy, at the same time, problem.

Enjoy.