-->

Thursday, February 18, 2016

Exchange Low Disk Space Due to System Volume Information

We recently got alerts of low disk space on our database and logs volume for one of our Exchange 2013 servers. Oddly, all of our Exchange servers are exactly the same, but only one of them had the warnings. After digging a bit, we found that the System Volume Information (Volume Shadow Copy) was located on the database volume, and it was massive - 900GB massive. Why Windows stuck it on that volume on that particular server I dunno.
We had to act quickly, because the 5% threshold was creeping up fast. We decided to set a limit on the Volume Shadow Copy to get the size under control, then we would move the shadow copy to our less-used Archive Databases volume.

First, what is the System Volume Information/Shadow Copy?

It holds:
- System Restore Points - not applicable on Server 2012
- Content Indexing Service for fast search - not important
- Volume Snapshot information - very important if you take system-state backups - we do not do this on Exchange since you use the "setup /m:RecoverServer" switch to recover a "borked" Exchange server.

To Shrink the Shadow Copy File:

First, we need to check the Shadow Storage usage.

Fire up an Elevated Command Prompt, and run:

vssadmin list shadowstorage

It will list out Volume Shadow Copy used space:

vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Shadow Copy Storage association
   For volume: (F:)\\?\Volume{1a54af9d-df2a-4635-b0c7-e65831001806}\
   Shadow Copy Storage volume: (F:)\\?\Volume{1a54af9d-df2a-4635-b0c7-e658310018
06}\
   Used Shadow Copy Storage space: 0 bytes (0%)
   Allocated Shadow Copy Storage space: 0 bytes (0%)
   Maximum Shadow Copy Storage space: UNBOUNDED (559628002%)

Shadow Copy Storage association
   For volume: (E:)\\?\Volume{0f21e816-3734-48da-adc1-187ba40c1b5f}\
   Shadow Copy Storage volume: (E:)\\?\Volume{0f21e816-3734-48da-adc1-187ba40c1b
5f}\
   Used Shadow Copy Storage space: 900 GB (19%)
   Allocated Shadow Copy Storage space: 600 GB (19%)
   Maximum Shadow Copy Storage space: UNBOUNDED (559628002%)

Shadow Copy Storage association
   For volume: (C:)\\?\Volume{efcb1592-b317-11e4-80b3-806e6f6e6963}\
   Shadow Copy Storage volume: (C:)\\?\Volume{efcb1592-b317-11e4-80b3-806e6f6e69
63}\
   Used Shadow Copy Storage space: 0 bytes (0%)
   Allocated Shadow Copy Storage space: 0 bytes (0%)
   Maximum Shadow Copy Storage space: 9.96 GB (7%)


As you can see, on volume E:/ (our database volume) the Used Shadow Copy space is 900GB. It's also set to UNBOUNDED by default, which means it has no limit to how much space it uses...bad for database volumes, since your DB's will dismount when there's only 5% of the drive left.

Resize the Shadow Copy Storage:

In CMD, run the following command:

vssadmin resize shadowstorage /on=E: /for=E: /maxsize=50GB

**Note** Change on=E: and for=E:/ to the drive that is full on your server, and change /maxsize=50GB to whatever you need to bring the size down.

Running vssadmin list shadowstorage again will show you the results:

Shadow Copy Storage association
   For volume: (E:)\\?\Volume{fb4e853f-2b2f-4af9-9b3b-1d75403d7130}\
   Shadow Copy Storage volume: (E:)\\?\Volume{fb4e853f-2b2f-4af9-9b3b-1d75403d71
30}\
   Used Shadow Copy Storage space: 0 bytes (0%)
   Allocated Shadow Copy Storage space: 0 bytes (0%)
   Maximum Shadow Copy Storage space: 50.0 GB (1%)


Once you have the size under control, you can move the Shadow Copy to a less-used volume - in our case its the Online Archive Volume of F:/

Moving the Volume Shadow Copy:

**Note** When you change the location of the shadow copy storage area, all previous shadow copies are deleted.

**Note** To create a shadow copy, you need an NTFS file system volume with at least 300 MB of free space. Do not store it on a removable drive or a drive that requires iSCSI to start before the drive is picked up by Windows.

1. Open This PC.

2. Right-click any drive, and then click Configure Shadow Copies.

3. Click the volume that is currently used for the volume shadow copy storage area, and then click Settings.
*
*Note** If shadow copies of the volume are enabled, you have to disable them by clicking the volume, and then clicking Disable.

4. Set the Volume Shadow Copy area volume to your other volume by selecting it from the drop-down list under Storage area, and then click OK.

5. Make sure that the volume is still selected, and click Enable then click Yes.

6. Click OK.

To verify that your Shadow Copy is in the correct spot, open your Elevated CMD and run vssadmin list shadowstorage and it will report that it's on another volume.

Now your System Volume Information is under control and your databases are happy to have their space back!

1 comment: