Wednesday, February 6, 2013

SharePoint 2010 Storage Metrics (Storman.aspx) Incorrect

I recently had a customer ask why the site collection owner did not receive a notification that his site collection was near its quota. Naturally, I asked what made him believe he was near his quota and he mentioned he noticed his site collection is consuming 5554 MB and is ~108% over it's quota (5120 MB) by viewing the Storage Metrics for his site collection.

I verified that his site collection was not 5554 MB as stated in Storage Metrics by:


  • Looking at the Site Collection Quota page in CA, the site collection quota is set to 5120 MB and the Current storage used is 4002 MB – quite different than what is reported via storman.aspx
  • The Site Collection Web Analytics report for the site collection (https://<sitecollection/_layouts/WebAnalytics/Report.aspx?t=StorageTrendsReport&l=sc) shows 4001.95 MB storage used.
  • The following PowerShell cmds calculate 4002 MB of storage used:
$site = Get-SPSite https://<sitecollection>
$site.Usage.Storage / 1mb;
$site.Dispose();


I stopped/started the Storage Metrics Processing timer job, ran PowerShell script to recalculate storage used, both to no avail:
$URL = "https://<sitecollection>"
$Site = Get-SPSite -identity $URL
$Site.RecalculateStorageUsed()
I then performed a backup / restore of the site collection and then an export/import... and voila! The import function recalculates the StorageMetrics table and *temporarily* resolves this issue. However, this issue will continue to reappear (see explanation below) until the solution is deployed. So... what's the actual problem and solution?

It appears that when a user checks out a document in a document library SharePoint is updating TotalSize field in StorageMetrics table to add the document size from the existing value when a document is checked- out and you would think they would deduct the file size from the TotalSize field in the StorageMetrics Table, once it is checked back in. Now either SharePoint is not deducting the document size upon check-in, or there is no function to account for documents which never get checked back in. Regardless, if you delete all content from a folder within a library with check-in/out enabled, then run the Storage Metrics Processing Job, check /_layouts/Storman.aspx you will see that the folders still hold a value of the former content, although that content is deleted.

The problem with exporting/importing sites is that you loose some functionaility such as workflow associations, etc. However, this discovery did lead me to the solution, which is found in the August 2012 CU. See the following article: http://support.microsoft.com/kb/2687339

6 comments:

  1. Finally did you get any solution. How can we get the correct Site metrics reports.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Yes, I installed the August 2012 Cumulative upadate: http://support.microsoft.com/kb/2687339

      Delete
    3. similar issue in sharepoint 2013 . we have recalculated the storage , still issue exists. Any idea on fix ?

      Delete
  2. Rick,
    In our scenario the total size allotted to site collection is 30600 MB and warning email is configured to trigger when size exceeds 29000 MB, however mail gets triggered before it reaches the threshold. Can you help me in this regard?

    ReplyDelete
  3. thanks for this usefull article, waiting for this article like this again. packing moving companies in dubai

    ReplyDelete