Monitor and forecast storage needs

Predicting the storage requirements of SharePoint installation requires a combined effort on the part of the farm administrator and the site collection administrators. Each cannot only monitor storage, but also record the data growth rate for predicting future database size requirements.

Although the farm administrator can often “drill down” to the same administrative level as the site collection administrator, his or her unfamiliarity with the data or its retention requirement makes the administration of storage at this level quite a bit more difficult. Likewise, the site collection administrator often has no insight into the available storage outside of a particular site collection.

Monitoring content databases

Central Administration does not provide a method to farm administrators for reviewing the size of either content databases or site collections. Windows PowerShell, on the other hand, provides a couple of different cmdlets for reviewing SharePoint databases: Get-SPDatabase and Get-SPContentDatabase.

Get-SPDatabase is the more generic of the two commands and will retrieve information about all databases within a SharePoint farm: configuration, content, and service application. Running Get-SPDatabase with Out-GridView displays all the databases currently attached to this SharePoint farm, as shown in Figure 1.

image

FIGURE 1 Get-SPDatabase | Out-GridView.

Get-SPContentDatabase is more suitable to this task, focusing specifically on databases that possess SharePoint content. Using this command with Out-GridView narrows the items returned to simply content databases (shown in Figure 2).

image

FIGURE 2 Content databases only (Get-SPContentDatabase).

Because a single web application may have multiple content databases, we can use the Get-SPContentDatabase cmdlet with the -webapplication switch to display all the content databases associated with a particular web application (see Figure 3).

image

FIGURE 3 Get-SPContentDatabase with the -webapplication switch.

 

To obtain the size of any individual database, you can assign a variable to the GetSPContentDatabase cmdlet along with the name of the individual content database; then query the disksizerequired property to get the size in bytes (see Figure 4):

$CDb = Get-SPContentDatabase -id <databasename>

$CDb.disksizerequired à Returns the size in Bytes $CDb.disksizerequired/1GB à Returns the size in Gigabytes

image

FIGURE 4 Using the disksizerequired property.

Monitoring individual site collections via Windows PowerShell

Retrieving the size of a single site collection in Windows PowerShell is much less complicated than retrieving the size of an entire content database. The Get-SPSite Windows PowerShell cmdlet can be used along with the URL of the site collection to retrieve information about the site collection. Then you can determine the size of the site collection using the usage property (see Figure 5).

$site = get-spsite -identity http://intranet.boston.local

$site.usage

image

FIGURE 5 Using the usage property (site collection sizing).

Monitoring site collection content

Site collection administrators can monitor the consumption of storage within their respective site collection by using the new Storage Metrics page. This page is located in the Site Collection Administration section of Site Settings, and shows a graphic representation of all content within the current site collection (see Figure 5-27).

image

FIGURE 6 Site collection storage metrics

This report is far from being one-dimensional. From here, a site collection administration can drill down into the content of an individual site, retrieving its storage metrics (see Figure 7).

image

FIGURE 7 Subsite storage metrics.