Install updates on an Exchange Server DAG
16 April 2020To update DAG members with new fixes, update rollups, or service packs, the update process must be managed to prevent all DAG members from being offline at the same time.
To do this, you can move the active mailbox databases out of a particular server so that they can be corrected, and if necessary restarted, without causing downtime for mailbox users on this database
The first step is to move the active mailbox databases to another DAG member so that the server can be updated.
1 2 3 4 5 6 7 8 9 |
Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus Name Status CopyQueue ReplayQueueLength LastInspectedLogTime ContentInde State Length ---- ------ --------- ----------------- -------------------- ----------------- DB1\srvexch1 Healthy 0 0 16/04/2020 20:33:28 Healthy DB1\srvexch2 Mounted 0 0 Healthy DB2\srvexch2 Mounted 0 0 Healthy DB2\srvexch1 Healthy 0 0 16/04/2020 20:37:37 Healthy |
All the basics must be healthy âHealthyâ.
To find out the name of the server hosting the databases, the status will be on “Mounted”.
Move mailbox databases
We will move the databases from SRVEXCH2 to SRVEXCH1
1 |
Move-ActiveMailboxDatabase "DB2" -ActivateOnServer SRVEXCH1 |
If you have several databases you can put:
1 |
Get-MailboxDatabase | where {$_.Server -eq "srvexch2"} | Move-ActiveMailboxDatabase -ActivateOnServer SRVEXCH1 -Confirm:$false |
All mailbox databases are now active on the SRVEXCH1 server
The final preparation step is to block activation on the server to prevent it from automatically activating a copy of the database while you are performing maintenance.
First check the current activation policy on the server
1 2 3 4 5 6 |
Get-MailboxServer | fl Name,DatabaseCopyAutoActivationPolicy Name : SRVEXCH1 DatabaseCopyAutoActivationPolicy : Unrestricted Name : SRVEXCH2 DatabaseCopyAutoActivationPolicy : Unrestricted |
Block activation with the following command:
1 |
Set-MailboxServer SRVEXCH2 -DatabaseCopyAutoActivationPolicy Blocked |
Activation of maintenance mode
We will use the script built into Exchange
1 2 |
cd $exscripts .\StartDagServerMaintenance.ps1 -serverName SRVEXCH2 |
The script will automatically perform the following tasks:
- Pause the database copy.
- Suspends the node in failover clustering so that it cannot become the primary active manager.
- Suspends database activation on each mailbox database.
- Defines the Strategy for automatic activation of the database copy on Blocked on the server.
- Moves the databases and cluster group from the designated server.
To verify that the maintenance mode is active, check that the databases are in âsuspendedâ mode:
1 |
Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus | fl name,activationSuspended, suspendComment |
Roll up installation
You can install the roll up directly by running msi, or otherwise use the following command:
1 |
msiexec /update C:\chader\Exchange2010-KB4018588-x64-fr-RL18.msp /lxv* c:\temp\rollup.log |
Remember to restart the server after installation, and do a check.
Deactivation of maintenance mode
Redefine the server activation policy to its original setting.
1 |
Set-MailboxServer SRVEXCH2 -DatabaseCopyAutoActivationPolicy Unrestricted |
The exit from maintenance mode is done with StopDagServerMaintenance.ps1.
The script will automatically cancel each of the actions performed by StartDagServerMaintenance.ps1, except that it will not bring the active mailbox databases back to the server.
1 2 |
cd $exscripts .\StopDagServerMaintenance.ps1 -serverName SRVEXCH2 |
To verify that the maintenance mode is deactivated, verify that the databases are no longer in âsuspendedâ mode:
1 |
Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus | fl name,activationSuspended |
Here is your server is operational, you can meter the 2nd server a day, the steps are similar, the only thing that differs is the name of the server
Once the intervention on the two servers is finished, it is important not to forget this step which allows to rebalance the databases on all the DAG servers
1 2 |
cd $exscripts .\RedistributeActiveDatabases.ps1 -DagName SRVEXCH-DAG -BalanceDbsByActivationPreference |
At the end check that you have no errors.
Views: 8876