Test farm out of space!

Problem:

Ran into an issue where my test environment database server bloated its .vhd file after performing several restores from backup through DPM 2010. The bloat caused the blade server to run out of space and froze all the other VMs on the server. Sys admin was not too happy about it!

Cause:

Investigation found that the SharePointAdmin and SP_Config database log files have grown to nearly 20 GB each. All the databases were also sitting on the C: Drive.

Resolution:

Move all databases to another drive, shrink log files and truncate SP_Config.log and SharePointAdmin.log.

Step 1.

Stop the following services on all SharePoint servers.

  • SharePoint 2010 Administration
  • SharePoint 2010 Timer
  • SharePoint 2010 Tracing
  • SharePoint 2010 User Code Host
  • SharePoint 2010 VSS Writer
  • SharePoint Foundation Search V4
  • World Wide Web Publishing Service
  • SharePoint Server Search 14
  • Web Analytics Data Processing Service
  • Web Analytics Web Service
  • IIS

Step 2.

On the database server, use SQL Management Studio to detach all the databases and copy them to the new location. If moving the Web Analytics database, ensure that you copy all the *.ndf files to the same folder as the *.mdf file.

Step 3.

Reattach the databases and log files.

Step 4.

Truncate the oversized log files by performing the following commands:

BACKUP LOG [Sharepoint_Config] WITH TRUNCATE_ONLY

USE [SharePoint_Config]

GO

DBCC SHRINKFILE (’SharePoint_Config_log’ , 50)

GO

Step 5.

Restart all services that were stopped in Step 4.

Result

Everyone is happy!

 

Tags:

No comments yet.

Leave a Reply

%d bloggers like this: