When normal Log truncation will happen
The following criteria must be met for a database copy's log file to be truncated when lag settings are left at their default values of 0 (disabled)
1. The log file must have been successfully backed up, or circular logging must be enabled.
2. The log file must be below the checkpoint (the minimum log file required for recovery) for the database.
3. All other lagged copies must have inspected the log file.
4. All other copies (not lagged copies) must have replayed the log file.
Transaction log disk goes out of space, If the Log truncation is not happening.
Truncation behaviour in Exchange 2013
In Exchange 2013 log truncation doesn't occur on an active mailbox database copy when one or more passive copies are suspended or not healthy (even though backup completes or circular logging enabled). This is because the transaction logs being generated on the active copy will be required to bring the now-suspended copies up-to-date when replication resumes.
If planned maintenance activities are going to take for several days, you may have considerable log file buildup. To prevent the log drive from filling up with transaction logs, you can remove the affected passive database copy instead of suspending it. When the planned maintenance is completed, you can re-add (Re-Seed) the passive database copy.
What is Loose Transaction
Exchange 2013 Service Pack 1 (SP1) introduces a new feature called loose truncation, which is disabled by default. When it's enabled, each database copy measures the free disk space on the drive holding the replicated logs. Loose truncation kicks in when a low-space threshold is exceeded (The default is 200GB). No UI is available in EAC to control the low-space threshold for database copies, so this value must be set in the system registry on each server that holds passive copies.
How to Configure
To configure loose truncation, you need to create three registry entries on each DAG member server. All three entries need to be created under the registry key HKLM\Software\Microsoft\ExchangeServer\V15\BackupInformation and need to use DWORD values
When loose truncation is enabled, Active Manager on the server holding the active database copy continues to calculate and publish truncation point (the generation number of the logs that are no longer required) to all passive copies except the passive copy that has the most logs to reply (oldest straggler).
For Example
if a database has three copies, one of which is offline, Active Manager might do the following:
Current log generation: 173,501
Copy 1 log replay queue: 20
Copy 2 log replay queue: 1
Copy 3 log replay queue: 110,200 (suspended)
Copy 3 is the oldest straggler, so it's ignored by Active Manager. Copy 1 has the largest queue (20), so the truncation point is calculated at 173,481 (173,501 − 20). Active Manager therefore advises all database copies that they can truncate logs up to generation 173,481.
Still Exchange defines a threshold value for the minimum number of transaction logs that it needs to protect, or the number of logs that should be retained for active and passive copies, even when disk space usage is becoming low (below the threshold set at the registry). By default, for the active copy, Exchange keeps an additional 10,000 logs over what it calculates should be truncated and an additional 100,000 logs for passive copies.
When the suspended database copy is brought back online, there will be a log file missing and hence exchange puts the database copy into FailedAndSuspended state. If AutoReseed is not configured, an administrator have to Re-Seed the database copy from active database copy.
Important
LooseTruncation_MinCopiesToProtect entry controls whether loose truncation isn't in use (the default value of 0) or is in use. If the specified value is less than the number of passive copies (for example, set to 1 when there are two passive copies of each database), loose truncation is enabled. If the specified value is greater than or equal to the number of passive copies, loose truncation isn't used. The feature is enabled, but it's blocked because of the high value.
Detail explanation.. I like it.. Many thanks John..
ReplyDelete