Tuesday, February 23, 2016

Troubleshoot DPM Service unable to start, unable to remove agents and 9xx-errors in the Event Viewer

Hi,
Quick post on one thing to check if you are expericening the following symtoms/issues on a DPM-server:
  • DPM AccessManager Service not starting 
  • DPM Accessmanager Service fails to start
  • DPM service not starting or having trouble restarting
  • Msdpm cannot be found
  • Unable to remove agents
  • Various 9xx errors in the event viewer

Resolution:
*** Important! Always create a backup of the DPM-database before doing any changes! ***
  1. Open SQL Management Studio on the dpm server and connect to the instance of your DPM sql engine
  2. Go to DPMDatabase (in my case: DPMDB_2012) > Tables > dbo.tbl_DLS_GlobalSetting
  3. Choose "Edit the top 200 rows" of that table and you will find a property called: DBRecovery
  4. The value should be 0, sometimes while doing dpmsyncs and other attempted repairs to dpm, this will be set to 1 and never change back to 0. 

I hope this will help someone with their troubleshooting!
//Markus

Wednesday, February 17, 2016

Monitor DPM Storage Pool

Hi,

I've created a small PowerShell-script that is ready to be used as a Performance Rule in System Center Operations Manager to monitor the amount of freespace in the storage pool on your DPM-server.

I will post a complete guide later on how to create the rule in SCOM!



-----------------------------------

#Load the MOMScript API and the PropertBag provider
$API = New-Object -comObject "MOM.ScriptAPI"
$bag = $api.CreatePropertyBag()

#Log an event at script-start
$api.LogScriptEvent("FreeDiskSpace.ps1",3280,0,"Collect FreeSpace in DPM-storagepool Script is starting")

#Main PowerShell-script
$FS = get-dpmdisk | where {$_.DiskTypeLabel -ne "Basic"} | Select UnallocatedSpaceLabel | ft -HideTableHeaders| Out-String -Stream
$FS = $FS | ForEach-Object {$_ -replace "GB", ""} 
$FreeSpace = ($FS | Measure-Object -Sum | select sum | ft -HideTableHeaders | Out-String).trim()

$TS = get-dpmdisk | where {$_.DiskTypeLabel -ne "Basic"} | Select TotalCapacityLabel | ft -HideTableHeaders| Out-String -Stream
$TS = $TS | ForEach-Object {$_ -replace "GB", ""} 
$TotalSpace = ($TS | Measure-Object -Sum | select sum | ft -HideTableHeaders | Out-String).trim()

#Add the data into the PropertyBag
$bag.AddValue("FreeSpace",$FreeSpace)
$bag.AddValue("TotalSpace",$TotalSpace)

#Log an event that our script is complete
$api.LogScriptEvent("FreeDiskSpace.ps1",3281,0,"Collect FreeSpace in DPM-storagepool Script is complete.  
$FreeSpace GB of $TotalSpace GB free in diskpool on $env:computername")

#Output the PropertyBag data for SCOM consumption
$bag

-----------------------------------


Kind Regards
Markus Eliasson

Thursday, February 4, 2016

Move protected data between DPM-disks: MigrateDatasourceDataFromDPM

Hi everyone,

Here is an example on how I use the MigrateDatasourceDataFromDPM.ps1 when I want to consolidate protected data or just empty one disk in the DPM storage-pool.

The ntdiskid-number in the script is the number you can see in either the get-DPMDisk output, the Windows Disk Management GUI or under Management - Disks in the DPM-console.

In the example below I want to move all data from disk 1 to disk 3,5 and 6:

$source = get-dpmdisk -dpmserver MyDpmServer | where {$_.ntdiskid -eq 1
$destination = get-dpmdisk -dpmserver MyDpmServer  | where {3,5,6 -contains $_.ntdiskid} 
MigrateDatasourceDataFromDPM.ps1 -DPMServername MyDpmServer  -source $source -destination $destination

//Markus