Home > Windows Server Tips > Active Directory Administration > Unwinding USN rollback when faced with AD replication failure
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ACTIVE DIRECTORY ADMINISTRATION

Unwinding USN rollback when faced with AD replication failure


Gary Olsen, Contributor
10.09.2007
Rating: -4.25- (out of 5)


Expert advice on Active Directory and Group Policy
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


As I noted in my previous article on solving unintentional replication failure, updated sequence number (or USN) rollback is a possible cause.

Microsoft's KB 875495 and KB 885875 articles indicate "it is difficult to detect and recover from a USN rollback." Some interpret this to mean that there is some magical error that inexplicably causes a USN rollback. Remember, a USN rollback is used -- often intentionally -- to roll Active Directory back to a previous known state by means of correcting an error such as accidental deletion of objects.

While USN rollback is a powerful tool in the recovery of objects, unintentional USN rollback will cause replication failure and an inconsistent Active Directory that produces no errors and is virtually undetectable by normal means, such as RepAdmin/showrepl. This has much more severe consequences than simply disabling replication. It is described quite well in KB 875495 with some excellent examples, but it does take a while to understand it.

What causes USN rollback?

Very simply, USN rollback is typically caused by restoring a domain controller using an image from a product like Norton's Ghost software, a volume snapshot or a virtual machine image used in VMware or Microsoft virtualization products. Other scenarios are listed in the KB, which states: The key to making a rollback work is resetting the invocation ID for the AD database. The invocation ID tracks the version of the database on a DC. If you don't reset this invocation ID is not reset when the database is restored, it will cause gaps in Active Directory between the restored DC and other DCs.

The problem comes when you use an unsupported method -- such as with an image -- to restore a DC to a previous state without resetting the invocation ID. This prevents the other DCs from replicating changes that were made after the image was recorded, up to the current time. Normally you'd think the changes would be replicated.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Microsoft Active Directory Replication
Tracking a deleted Active Directory object's replication status
How to build redundancy in Active Directory replication
Bad external time source stops Active Directory replication
Solving Active Directory replication failure
ReplMon still tops for troubleshooting Active Directory replication
Active Directory Replication Guide
Understanding DFSR for easy configuration of Active Directory replication groups
Distributed File System feature prioritizes target servers in Active Directory
Case Study: How to force immediate Active Directory replication for all core sites
When Active Directory replication fails: Debugging Event ID 1311

Microsoft Active Directory Tools and Troubleshooting
Troubleshooting poor Windows logon performance in Active Directory environments
New Operations Manager 2007 feature allows for automated agent deployments
Taming the LSASS.exe process for Active Directory performance and security
Active Directory FAQs
Troubleshooting Active Directory database errors
Troubleshooting a cross-forest trust in Active Directory
Bad external time source stops Active Directory replication
Time stamps change with daylight-saving time
DNS troubleshooting tips for Active Directory
How the DC locator works in Active Directory

Active Directory Administration
Using Active Directory to manage Macs in a Windows environment
Troubleshooting poor Windows logon performance in Active Directory environments
Common Active Directory security oversights
Scripting domain controller installations: A must for Server Core
Taming the LSASS.exe process for Active Directory performance and security
Troubleshooting Active Directory database errors
Active Directory database basics: Performing an offline defrag
Branch office security: Pros and cons of read-only domain controllers
Tips for Windows domain controller optimization
How to rebuild the SYSVOL tree when none exists in Active Directory

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


However, the other DCs will act as if they have replicated with the restored DC so no changes will be replicated. In fact, they will never replicate.

Tools like RepAdmin/showreps will show that replication is working, as replication events do not detect the replication failure here. You may detect inconsistencies in Active Directory, however.

For instance, if you have user accounts created on a DC after the backup was taken on the restored DC, and since the restored DC will never get those accounts due to the invocation ID not being reset, there could be authentication failure when users attempt to authenticate against the restored DC. Of course this affects all objects such as replication topology, FSMO role holders, security groups and memberships, DNS records and others. To make matters worse, this DC will never catch up, since the other DCs will act as if the restored DC has the missing objects.

Detecting USN rollback

The challenge is to detect and fix this. KB 875495 is actually a hotfix for pre-Windows 2003 SP1 servers that causes Event 2095 to be logged if a DC sends a USN that was previously known without a change in the invocation ID. This will pause the Netlogon service on the restored domain controller, preventing authentication to that DC. The KB article also provides a sample Event 2095 with an extensive description of the problem and actions needed.

There are other ways to detect USN rollback, including with the use of the RepAdmin/showutdvec command, which KB 875495 describes. With this command, you can show the up-to-dateness vector table on each DC and see that there is a discrepancy. Of course, you have to first suspect the problem or monitor the event logs for Event 2095 to use this command. If you have restored a DC using an image, snapshot or a virtual machine image, you should monitor for this error.

The solution here is a familiar one -- manually demote the restored DC and re-promote it. That's the only way you'll get the AD to be consistent on all DCs. Of course, you can also use the Install From Media (IFM) feature to save time, but remember: You still must use an "AD aware" backup software to back up a valid DC in the domain for the IFM procedure to work. For more details on this, check out my article on Recovering a DC using Install From Media.

The best solution is to not use one of the "illegal" restoration methods noted in this article and in KB 875495, especially if you use an "AD aware" backup software. If you are using virtualization for hosting DCs, take note of KB 888794 for more information.

Gary Olsen is a systems software engineer for Hewlett-Packard in Global Solutions Engineering. He authored Windows 2000: Active Directory Design and Deployment and co-authored Windows Server 2003 on HP ProLiant Servers. Gary is a Microsoft MVP for Directory Services and formerly for Windows File Systems.


Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts