How to increase DPM 2016 replica when using Modern Backup Storage (MBS)
Published Feb 16 2019 04:22 AM 18.8K Views
First published on TECHNET on Apr 14, 2017
There may be circumstances where the replica volume for a protected data source is under allocated or a very large increase of protected data results in synchronization or recovery point job failures due to inadequate space on the replica.

Some common examples of where this might occur are explained below.

  • Bare Metal Restore (BMR) protection. In DPM, BMR protection covers protection for operating system files (System State) and critical volumes (excluding user data). DPM does not calculate the size of BMR data source, but assumes 20 GB for all servers. At the time of protection this cannot be changed in the disk allocation page when using Modern Backup Storage (MBS).


Admins can change the default replica size as per the size of BMR backups expected in their environments.   This is a global setting and effects all future BMR replica allocation size.

Size of BMR backup can be roughly calculated sum of used space on all critical volumes.

Critical volumes = Boot Volume + System Volume + Volume hosting system state data such as AD DIT/log volumes.

To help calculate the size of a BMR for a protected server, run the following command on that server then total up the used space for the volume(s) listed.
C:\>wbadmin.exe start backup -allcritical -backuptarget:\\server\bmrshare
This should show you the list of volumes included in the BMR backup and ask "Do you want to start the backup operation?. - Type N to exit then total all the used space on the volumes listed minus the page file size if one is hosted on a critical volume.  Alternately you can Type Y and let the BMR backup continue and once finished check the size of the WindowsImageBackup folder  on the target share.

To change the default replica size for ALL future BMR protection use the following registry key:
HKLM\Software\Microsoft\Microsoft Data Protection Manager\Configuration
REG_DWORD: ReplicaSizeInGBForSystemProtectionWithBMR
However, if you only need to increase the replica for a subset of servers or are having problems getting a good initial replica for one, you can use the information in this article to manually increase the specific replica volume(s).

  • Exchange Protection. There may be a time when you want to migrate users between mailbox databases or between exchange servers.  During migration, there will be a large increase in the number of exchange logs created and an increase in the size of the destination mailbox database(s).  These large increases in a short period of time can result in DPM backup failures if the replica cannot be grown large enough in time to accommodate the influx of new data.

  • Hyper-V Protection. Some customers run hosting environments and deploy rather generic virtual machines then protect them with DPM.  Sometime in the future the owners of those VM’s deploy applications that create data (like exchange) or load new data into the guests.  This large increase in the VM size can cause ongoing DPM backup failures if the replica cannot be grown large enough in time.

  • File Server protection. DPM Supports protecting Windows dedup volumes.  DPM will store the protected file data in a dedup state when the entire volume is protected.  If at a later time you decide to only protect a subset of data – or if you stop dedup on the protected server, DPM will start protecting the volume in a non-dedup state.  This will require much more space on the DPM replica to hold the file data in its native non-dedup form.


Below is an example of a failed recovery point job for a VM due to an undersized replica.
Type:     Recovery point
Status:  Failed
Description:        DPM is out of disk space for the replica. (ID 58 Details: There is not enough space on the disk (0x80070070))
More information
End time:             3/22/2017 12:04:21 PM
Start time:           3/22/2017 11:30:01 AM
Time elapsed:    00:34:20
Data transferred:             22,260.38 MB
Cluster node      -
Recovery Point Type       Express Full
Source details:   DPM2016-GA
Protection group:             Hyper-V
As in previous versions, DPM 2016 has replica auto-grow feature for modern backup storage (MBS) to help increase the replica sizes as the data sources grows.  Under normal use conditions this feature works perfectly fine.  If a job fails due to out of disk space, it will automatically grow the replica volume and schedule a new synchronization or recovery point job to run one hour in the future.  However, if the amount of new data is much larger than the size of the replica after auto-grow, the jobs will continue to fail even as the auto-grow continues to increase the replica size.  After two failures, auto-rerun is no longer triggered by default. In DPM 2012 R2 you had the ability to manually grow the replica volume as large as you wanted by using the “modify disk allocation” wizard, however in the DPM 2016 you do not have the ability to manually grow the replica volume using the same wizard.  This can cause delays in getting good backups again to meet your SLA.   If you know the new size of the protected data or want to grow the replica volume for future data growth in order to prevent future backup failures, you can grow the replica manually outside of DPM.

Manually Extending a Replica volume on MBS


DPM 2016 Update Rollup 1 added support for using the DPM PowerShell cmdlet Edit-DPMDiskAllocation to extend a DPM Replica volume hosted on Microsoft Modern Storage.

The below DPM PowerShell script helps simplify the process of manually extending a replica volume regardless if it is located on legacy LDM disk based or Modern Backup Storage (MBS) volumes.

Sample Screenshot:


DPM PowerShell script


Copy below and save as ResizeReplica.ps1 then run it from the DPM PowerShell console.



<COPY BELOW>
#Resized Replica Volume located on DPM 2016 +UR1 Modern Backup Storage.

$version="V1.0"

$ErrorActionPreference = "silentlycontinue"



[uint64] $GB=1048576000 #Multiple of 10MB

$logfile="ResizeReplica.LOG"

$confirmpreference = "None"



function Show_help

{

cls

write-host "Version: $version" -foregroundcolor cyan

write-host "Script Usage" -foregroundcolor green

write-host "A: Script lists all protected data sources plus current Replica size." -foregroundcolor green
write-host "B: User Selects data source to resize replica for." -foregroundcolor green

write-host "C: User enters new Replica Size in GB." -foregroundcolor green

write-host "Appending inputs and results to log file $logfile`n" -foregroundcolor white

}

"" >>$logfile

"**********************************" >> $logfile

"Version $version" >> $logfile

get-date >> $logfile

show_help

$C=Read-Host "`nThis script is only intended to be ran on DPM 2016 + UR1 or later - Press C to continue. "

write-host $line -foregroundcolor white
$line = "This script is only intended to be ran on DPM 2016 + UR1 or later - Press C to continue."

$line = $line + $C

$line >> $logfile

if ($C -NotMatch "C")

{

write-host "Exiting...."

Exit 0

}

write-host "User Accepts all responsibilities by entering a data source" -foregroundcolor white -backgroundcolor blue


$DPM = Connect-dpmserver -Dpmservername (&hostname)

$DPMservername = (&hostname)

"Selected DPM server = $DPMservername" >> $logfile

write-host "`nRetrieving list of data sources on $Dpmservername`n" -foregroundcolor green

$pglist = @(Get-ProtectionGroup $DPMservername) # Created PGlist as array in case we have a single protection group.

$ds=@()
$count = 0

$dscount = 0

foreach ($count in 0..($pglist.count - 1))

{

$ds += @(get-datasource $pglist[$count]) # Created DS as array in case we have a single protection group.

}

if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive}



$i=0

write-host "Index Protection Group     Computer             Path                                     Replica-Size Bytes"

write-host "-----------------------------------------------------------------------------------------------------------"

foreach ($l in $ds)

{

"[{0,3}] {1,-20} {2,-20} {3,-40} {4}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath, $l.replicasize

$i++
}

$DSname=read-host "`nEnter a data source index number from the list above."

write-host ""

if (!$DSname)

{

write-host "No datasource selected, exiting.`n" -foregroundcolor yellow

"Aborted on no Datasource index selected" >> $logfile

exit 0

}

$DSselected=$ds[$DSname]

if (!$DSselected)

{

write-host "No valid datasource selected, exiting. `n" -foregroundcolor yellow

"Aborted on invalid Datasource index number" >> $logfile

exit 0
}



if ($DSselected.Replicasize -gt 0)

{

$Replicasize=[math]::round($DSselected.Replicasize/$GB,1)

$line=("Current Replica Size = {0} GB for selected data source: $DSselected.name" -f $Replicasize)

$line >> $logfile

write-host $line`n -foregroundcolor white

}


[uint64] $NewReplicaGB=read-host "Enter new Replica size in GB"

if ($Replicasize -ge $NewReplicaGB)
{

write-host New Replica size must be greater than current size of $Replicasize GB - Exiting.

$line =("New Replica size must be greater than current size - Exiting")

$line >> $logfile

exit 0

}

$line=("Processing Replica Resize Request of {0} GB.  Please wait..." -f $NewReplicaGB)

$line >> $logfile

write-host $line`n -foregroundcolor white



# execute the resize

Edit-DPMDiskAllocation -DataSource $DSSelected -ReplicaSize ($NewReplicaGB*$GB)



$line = "Resize Process Done ! "

write-host $line
$datetime = get-date

$line = $line + $datetime

$line >> $logfile

$line="Do you want to View $logfile file Y/N ? "

write-host $line -foregroundcolor white

$Y=read-host

$line = $line + $Y

$line >> $logfile

if ($Y -ieq "Y")

{

Notepad $logfile

}


<END COPY ABOVE>
10 Comments
Copper Contributor

The script seemingly works flawlessly - even when checking in the log file the size increase seems to happen. When re-running the job - same error message as before (out of replica disk space) when rerunning the script sure enough no change had occurred to the originally assigned replica disk space.

Copper Contributor

Switching  to $ErrorActionPreference = "continue" vs silentlycontinue reveals

 Edit-DPMDiskAllocation : DPM could not execute a WMI query. The query either returned an error or an empty result.
(ID: 33507)
Retry the operation.
At C:\Program Files\Microsoft System Center\DPM\DPM\bin\ResizeReplica.ps1
+ Edit-DPMDiskAllocation -DataSource $DSSelected -ReplicaSize ($NewRepl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Edit-DPMDiskAllocation], NonFatalWmiException
+ FullyQualifiedErrorId : WMIFailedToExecuteQuery,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmd
Lets.ModifyDPMDiskAllocation

 

If I had to guess this might be a permission problem? 

 

 

Copper Contributor

Having the same issue. I run the script on 2016 dpm update 6. And sure enough it looks like it works, I recheck the volume it is at the correct size, but when I re-run the job, the job doesn't complete. it doesn't give me an error or anything now it just says it's OK but the file size is 72gig vs the 7TB it should be. This script is not working.

Copper Contributor

The optimize disk (defragsvc) must be enabled for the script to work.  You can replace the # Execute the resize section in your script to catch that problem.

# execute the resize
Write-host "Processing Resize Request. Please wait..."
$error.clear()
$DPM.Proxy.ResizeReplica($DSSelected.DataSourceID,$NewReplicaGB*$GB)
if($error)
         {
          $line=("Error Extending !! - aborted. --->  Verify Optimize Disk (defragsvc) Service startup type is set to Manual then retry the operation.")
          $line >> $logfile
          write-host $line`n -foregroundcolor red
          Disconnect-dpmServer
          exit 1
         }

Copper Contributor

Experiencing this exact issue on a freshly installed server 2019 - with DPM 2019

 

Trying to run the script - but the outcome is (of course): "This script is only intended to be ran on DPM 2016 + UR1 or later"

 

Is there a script available for DPM 2019?

I desperately need it.

 

Thanks in advance.

 

Will

 

EDIT: Nevermind - I must have been tired when I ran the script - I just needed to press C to continue - to make it work

Copper Contributor

Latest version V1.2 of the script.

#Resized Replica Volume on Modern Backup Storage
#Tested on DPM 2016 + UR2 on Windows 2016.
# V1.1 - added error checking when defragsvc is disabled
# V1.2 - Only include PG's with short term disk is true IsDiskShortTerm = 1 + show size in MB
$version="V1.2"
$ErrorActionPreference = "silentlycontinue"

[uint64] $GB=1024*1024*1024
$logfile="ResizeReplica.LOG"
$confirmpreference = "None"

function Show_help
{
cls
write-host "Version: $version" -foregroundcolor cyan
write-host "A: User Selects data source to resize replica" -foregroundcolor green
write-host "B: User enters new Replica Size in GB" -foregroundcolor green
write-host "Appending to log file $logfile`n" -foregroundcolor white
write-host "User Accepts all responsibilities by entering a data source or just pressing [Enter] " -foregroundcolor white -backgroundcolor blue

}

"" >>$logfile
"**********************************" >> $logfile
"Version $version" >> $logfile
get-date >> $logfile
show_help

$DPM = Connect-dpmserver -Dpmservername (&hostname)
$DPMservername = (&hostname)
"Selected DPM server = $DPMservername" >> $logfile
write-host "`nRetrieving list of data sources on $Dpmservername`n" -foregroundcolor green
$pglist = @(Get-ProtectionGroup |where { $_.IsDiskShortTerm -eq 1}) # Created PGlist as array in case we have a single protection group.
$ds=@()
$count = 0
$dscount = 0
foreach ($count in 0..($pglist.count - 1))
{
#write-host $pglist[$count].friendlyname
$ds += @(get-datasource $pglist[$count]) # Created DS as array in case we have a single protection group.
#write-host $ds
#write-host $count -foreground yellow
}
if ( Get-Datasource $DPMservername -inactive) {$ds += Get-Datasource $DPMservername -inactive |where {$_.IsDiskInactive -eq 1}} #Include Inactive DataSources with Disk Protection

$i=0
write-host "Index Protection Group Computer Path Replica-Size-MBytes"
write-host "------------------------------------------------------------------------------------------------------"
foreach ($l in $ds)
{
"[{0,3}] {1,-20} {2,-20} {3,-35} {4}" -f $i, $l.ProtectionGroupName, $l.psinfo.netbiosname, $l.logicalpath, ($l.replicasize/1024/1024)
$i++
}
$DSname=read-host "`nEnter a data source index number from the list above."

if (!$DSname)
{
write-host "No datasource selected, exiting.`n" -foregroundcolor yellow
"Aborted on no Datasource index selected" >> $logfile
exit 0
}
$DSselected=$ds[$DSname]
if (!$DSselected)
{
write-host "No valid datasource selected, exiting. `n" -foregroundcolor yellow
"Aborted on invalid Datasource index number" >> $logfile
exit 0
}

if ($DSselected.Replicasize -gt 0)
{
$Replicasize=[math]::round($DSselected.Replicasize/$GB,1)
$line=("Current Replica Size = {0} GB for selected data source: $DSselected.name" -f $Replicasize)
$line >> $logfile
write-host $line`n -foregroundcolor white
}


[uint64] $NewReplicaGB=read-host "Enter new Replica size in GB"
if ($Replicasize -ge $NewReplicaGB)
{
write-host New Replica size must be greater than current size of $Replicasize GB - Exiting.
$line =("New Replica size must be greater than current size - Exiting")
$line >> $logfile
exit 0
}
$line=("New Replica Size = {0} GB " -f $NewReplicaGB)
$line >> $logfile
write-host $line`n -foregroundcolor white

# execute the resize
Write-host "Processing Resize Request. Please wait..."
$error.clear()
$DPM.Proxy.ResizeReplica($DSSelected.DataSourceID,$NewReplicaGB*$GB)
if($error)
{
$line=("Error Extending !! - aborted. ---> Verify Optimize Disk (defragsvc) Service startup type is set to Manual then retry the operation.")
$line >> $logfile
write-host $line`n -foregroundcolor red
Disconnect-dpmServer
exit 1
}

 

$line = "Resize Process Done ! "
write-host $line
$datetime = get-date
$line = $line + $datetime
$line >> $logfile
$line="Do you want to View $logfile file Y/N ? "
write-host $line -foregroundcolor white
$Y=read-host
$line = $line + $Y
$line >> $logfile
if ($Y -ieq "Y")
{
Notepad $logfile
}

Copper Contributor

OK, so a stupid question on this as I am having the same problem - DPM 2019 Rollup 3 connecting to a mix of Server 2016 and Server 2019 machines to pull BMR and System State and I am getting the error of "DPM is out of disk space for the replica".

 

I found this script and I think this is great and I have attempted to run it on 2 separate servers but when I do and my list of data sources comes up, the list is empty.  Obviously, that is my problem but I am not sure how to get that to populate now.  

Copper Contributor

Hey there,

 

I'm running Azure Backup Server (DPM 13.0.415.0) and being plagued with the replica size issue when trying to backup BMS on my servers. Tried the script above (1.2 posted by mjacquet) but it errors out when checking that defragsvc is set to manual even though it is. Sadly my PS skills are not up to troubleshooting. Any help? Thanks!

 

Edit: belay that - my bad, I was not entering the new replica size in GB as requested. I'm a bonehead...

Microsoft

Just a FYI - there is a known issue where the replica volume may not get mounted properly and result of BMR backup being written to the c: volume and fill up all the free space before resulting in errors.  There is a fix available for MABS and DPM. 

Copper Contributor

Thanks for the response and the heads up! As mentioned, the MABS console reports DPM 13.0.415.0. If I click the 'Update' button on the toolbar in MABS, it just takes me to the download page for MABS V3. Is there something newer applicable to MABS? Can you link to it if so? Thanks!

 

Edit:  Found this: https://support.microsoft.com/en-us/topic/update-rollup-1-for-microsoft-azure-backup-server-v3-d9504...

 

Or this maybe even: https://www.catalog.update.microsoft.com/Search.aspx?q=5004579

 

That it?

Version history
Last update:
‎Mar 11 2019 10:35 AM
Updated by: