DPM has a handy function during client provisioning that allows you to automatically allocate a quota size. Basically, it takes the used size on for a data source, multiplies it by three, and then divides that by two which give you your quota (say you are setting up a data source that is the C drive of a server which has 10GB of data on it…10GBX3 = 30GB/2 = 15GB quota). This works fine in some situations where a server has already been in use for a while and has fairly static space usage. However, there will definetly be situations where this set quota size is not enough and needs to be increased.
DPM does not have an autogrow function for quota allocation, therfore if a data source hits either of its limits, the data source simply stops backing up. Through the DPM UI, it is easy enough to right click on a data souce and modify the disk allocation, however this is cumbersome and requires daily audits to watch for overages. This script will scan every data source on a defined DPM server and if the datasource is within a defined threshold, increase its limit by a defined amount (Unfortunatly there is no way to “recalculate” a quota limit after it has been setup).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | param($dpmserver) $ReplicaThreshold = 1GB $SCThreshold = 1GB $ReplicaGrowBy = 3GB $SCGrowBy = 1GB connect-dpmserver -dpmservername $dpmserver $PGList = @(Get-ProtectionGroup $dpmserver) foreach($PG in $PGList) { $MPG = Get-ModifiableProtectionGroup $PG $dslist=@(get-datasource $MPG) foreach ($ds in $dslist) { if(($ds.ReplicaSize - $ds.ReplicaUsedSpace) -lt $ReplicaThreshold) { write-host "" write-host "Need to grow replica for $($ds.Name) on $($ds.ProductionServerName)" -Fore green $NewReplicaSize = $ds.ReplicaSize + $ReplicaGrowBy Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGroup $MPG -ReplicaArea $NewReplicaSize } if($ds.ShadowCopyAreaSize - $ds.ShadowCopyUsedSpace -lt $SCThreshold) { write-host "" write-host "Need to grow recovery point volume for $($ds.Name) on $($ds.ProductionServerName)" -Fore Green $NewSCSize = $ds.ShadowCopyAreaSize + $SCGrowBy Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGroup $MPG -ShadowCopyArea $NewSCSize } } Set-ProtectionGroup $MPG } Disconnect-DPMServer $dpmserver |
Tags: DPM, powershell
Hi,
Thanks! This was the script that was missing!
I was starting to get crazy, every day looking for DPM and managing and monitoring more than 200 volumes seeking for space needed.
Great Script, a must have1
Best Regards,
Ricardo Fernandes
Glad to hear it helped out. With DPM 2010, marked to RTM early 2010, Microsoft is implementing an auto-grow feature to fix this problem.