A script to set or remove disk quotas for protected client computers in System Center Data Protection Manager - System Center: Data Protection Manager Engineering Team Blog - Site Home - TechNet Blogs

A script to set or remove disk quotas for protected client computers in System Center Data Protection Manager

A script to set or remove disk quotas for protected client computers in System Center Data Protection Manager

  • Comments 1
  • Likes

imageThe Set-Quota PowerShell script (attached below) applies or removes disk quotas for protected client computers. It uses the expected data size per client value of the protection group to set the required disk quota for the client computers protected under that protection group.

The script leverages windows FSRM (File Server Resource Manager) which should be installed on the DPM server before scripts can run.

Using the script, the quota can be applied or removed for:

1) All client Protection groups in the DPM Server.

2) A specific protection group.

3) A specific client machine.

 

Things to note when using the script:

1) Script disables auto grow: Auto grow is a check box setting available in the PG creation flow which enables the client’s replica to grow automatically when data size exceeds allocated replica size. This particular setting will be unchecked if quota script is run for the PG or a client in the PG. It is to make sure that when client’s data grows out of its quota limit, the backups start to fail with Replica volume threshold exceeded.

2) Script should be run when clients are added for protection: The script when executed, applies quota for all the clients for whom protection is configured as of now in DPM. When new clients keep getting added to protection, script should be run to again set quota for them. You can also schedule quota script to run at desired frequency.

3) Ability to set threshold: Script provides ability to set a warning threshold for early indication of anticipatory failures. It is notified with a warning event in Application events with id: 12325 whenever a client’s backup data size crosses the threshold limit.

4) Quota exceeded Indication: When client’s data exceeds the quota limit, an error event is also raised in application event viewer with id: 12325. DPM’s backups also fail with ‘Replica Disk threshold exceeded’ alert in DPM. Client UI also shows the backup related error.

5) Logging: The script logs its activity in log file: [DPM Install Path]\DPM\Temp\Set-Quota.log.

6) Usage: From DPM PowerShell command, run get-help Set-Quota.ps1. The help works like any other command let. See some details.

 

 

Details for deployment/testing:

1) Copy Set-Quota.ps1, QuotaExceededNotification.txt, QuotaThresholdNotification.txt and Set-Quota-Scheduler.bat from the zip folder to DPM bin folder.

2) To run script manually, open DPM management shell and run Set-Quota.ps1. (get-help Set-Quota.ps1 for help)

3) To schedule the script, create a new scheduled task with Set-Quota-Scheduler.bat as the target.

 

 

Appendix:

Expected data size setting per Client:

clip_image003

Enabling FSRM in DPM Server:

From Server manager wizard, do the following 2 steps

1. Add 'File Services' Role if not already added:

clip_image005

2. Go to File Services Role and in 'Add Role Services' check mark 'File Server Resource Manager' and chose install as shown below:

clip_image007

Disk Quota Threshold Exceeded Warning Event:

clip_image009

Disk quota exceeded error event:

clip_image011

Quota exceeded failure in DPM:

clip_image013

Backup Error in Client:

clip_image015

Set-Quota help:

To see the examples, type: "get-help C:\Program Files\Microsoft DPM\DPM\bin\Set-Quota.ps1 -examples".

For more information, type: "get-help C:\Program Files\Microsoft DPM\DPM\bin\Set-Quota.ps1 -detailed".

For technical information, type: "get-help C:\Program Files\Microsoft DPM\DPM\bin\Set-Quota.ps1 -full".

You can download the script here:

Venkata Ramana Murthy | SDET II, SC Data Protection Manager

The App-V Team blog: http://blogs.technet.com/appv/
The WSUS Support Team blog: http://blogs.technet.com/sus/
The SCMDM Support Team blog: http://blogs.technet.com/mdm/
The ConfigMgr Support Team blog: http://blogs.technet.com/configurationmgr/
The SCOM 2007 Support Team blog: http://blogs.technet.com/operationsmgr/
The SCVMM Team blog: http://blogs.technet.com/scvmm/
The MED-V Team blog: http://blogs.technet.com/medv/
The DPM Team blog: http://blogs.technet.com/dpm/
The OOB Support Team blog: http://blogs.technet.com/oob/
The Opalis Team blog: http://blogs.technet.com/opalis
The Service Manager Team blog: http: http://blogs.technet.com/b/servicemanager
The AVIcode Team blog: http: http://blogs.technet.com/b/avicode
The System Center Essentials Team blog: http: http://blogs.technet.com/b/systemcenteressentials
The Server App-V Team blog: http: http://blogs.technet.com/b/serverappv

clip_image001 clip_image002

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • One thing to note for newcomers is that this script will only work if you are using PowerShell version 2.