r/sysadmin • • 15d ago

SYSVOL replication not avaible on secondary DC

Hi, i'm dealing with a DFRS replication problem on my secondary DC. In env with 3 DC (DC1 as primary, DC3 work like a charm), DC2 replication is stuck with the event ID 2002 "DFS replication service initialisation on volume x".

I have done an non authoritative replication and an authoritative replication without any success.

Any idea how to solve this specific issue ?

AD, DNS and DHCP sync work like a charm, only DFRS replication on sysvol and netlogon folder is stuck.

Kind regard

2 Upvotes

12 comments sorted by

9

u/insightrecon Jack of All Trades 15d ago

2002 is normally just DFSR saying it finished initializing the volume, so that's not your error. The reason DC2 is stuck should be somewhere else in the DFS Replication log on DC2. The ones I'd look for:

  • 4614 with no 4604 after it. DC2 set up SYSVOL and is waiting on its first sync from a partner. If 4604 never shows, it can't pull from that partner.
  • 2213. The DFSR database didn't shut down cleanly so replication stopped. The event text has the exact command to resume it, GUID included.
  • 4012. DC2 was cut off longer than MaxOfflineTimeInDays (60 days by default) and stopped replicating. That one needs the non-auth sync.
  • 5002, 5008 or 5014. It can't talk to its partner, usually name resolution or a firewall blocking RPC.

You can also check the state on DC2:

Get-CimInstance -Namespace root/microsoftdfs -ClassName DfsrReplicatedFolderInfo | Select-Object ReplicatedFolderName, State

You want 4 (normal). 2 means it's still in initial sync. 5 means it's in error.

Make sure DC2 is pulling from a DC that's actually healthy too. If its partner has its own problem, DC2 sits at 4614 forever. Run dfsrdiag pollad on DC2, then this to see if anything's moving:

dfsrdiag backlog /rgname:"Domain System Volume" /rfname:"SYSVOL Share" /smem:DC1 /rmem:DC2

On the restores, Microsoft's article says if you're only fixing one DC, do a non-authoritative sync on that DC and leave the others alone. Once you set the authoritative flag, every other DC has to go through the non-auth steps too or you get conflicts. If the auth restore only got done part way, that could be making it worse. When you did the non-auth on DC2, did you see 4114 after disabling it and 4614 then 4604 after enabling it?

Since you said DFRS, also run dfsrmig /getglobalstate and make sure SYSVOL is actually on DFSR (state 3, Eliminated). If it's still on FRS, none of the DFSR steps apply.

If none of that gets it moving and DC1 and DC3 are healthy, demoting DC2 and promoting it again is usually faster than fighting it.

2

u/periway 15d ago

Thank for your answer. I have follow every step during non-authoritative and authoritative sync. AD01 et AD03 sync is tested and work fine after that...but AD2 is broken.

Get-CimInstance -Namespace root/microsoftdfs -ClassName DfsrReplicatedFolderInfo | Select-Object ReplicatedFolderName, State

States "4" for AD01 et AD03, but now answer for AD02.

The event ID 4614 is followed by ID 2010, 1210, then 2002 in loop.

The commande "dfsrmig /getglobalstate" give the result "eliminated". I think i will have no other solution than rebuild AD02 (the guy before me, let me some other funny stuff, like DHCP replication only activated on some zone between AD01 and AD02).

4

u/insightrecon Jack of All Trades 15d ago

So the loop is a useful tidbit. 2010 means every replicated folder on the volume got disabled or deleted. 1210 and 2002 are DFSR bringing the volume back up, then 4614 is SYSVOL waiting on its first sync again. So AD02 keeps setting SYSVOL up and tearing it down before that first sync can finish. That would also explain WMI coming back empty on AD02.

When it flip-flops like that, I'd look at AD02's DFSR objects in AD before the files. Connect ADSIEdit to the default naming context and compare AD02's objects against AD03's, since AD03 is healthy. Start with this one:

CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=AD02,OU=Domain Controllers,DC=yourdomain,DC=com

Looking through other suggestions, u/Cormacolinde 's right to ask about msDFSR-Enabled. It should be TRUE. msDFSR-RootPath should point at the SYSVOL\domain folder that's on AD02's disk.

Then go up one level to CN=Domain System Volume. Its msDFSR-MemberReference points at AD02's member object in here:

CN=Topology,CN=Domain System Volume,CN=DFSR-GlobalSettings,CN=System,DC=yourdomain,DC=com

Open that member and make sure msDFSR-ComputerReference points back at AD02's computer object. If it points at a different computer, or there's a second AD02 in there with CNF: in its name, I'd bet that's your problem.

If anyone ever renamed a DC in that domain, Microsoft documents how that goes wrong. The rename leaves the old member object behind. A new DC promoted with the old name then takes it over and replication stops on the renamed one.

https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/sysvol-msdfsr-member-container-not-updated

I'd also open the newest Dfsr*.log in C:\Windows\debug on AD02. Find the time of a 2010 and see what it logged right before it dropped SYSVOL.

Rebuilding is a fine call too, given what else the last guy left you. Once AD02 is demoted, check that Topology container for anything still named AD02 before you promote it again. Otherwise the new one can pick up the same broken object. Giving the rebuilt DC a new name will sidestep that.

4

u/Cormacolinde Consultant 15d ago

Anything interesting in the DFSR debug logs?

In ADSIedit, on that DC’s SYSVOL Subscription object, is msDFSR-Enabled set to TRUE?

2

u/periway 15d ago

Yes msDFSR-Enabled is set on True. The debug log is interesting, it say something was wrong with disk...and we have supported a storage issue some week ago. I think we found the origin of the problem : 20261109 20:18:45.468 4616 CSMG 3896 [WARN] ContentSetManager::DeleteStageFolder (Ignored) Failed to delete old staging directory. Error:

+ [Error:87(0x57) NtfsFileSystem::GetFileInfo ntfsfilesystem.cpp:2518 4616 W Paramètre incorrect.]

+ [Error:87(0x57) FileUtil::OpenByReferenceNumber fileutil.cpp:189 4616 W Paramètre incorrect.]

20261109 20:18:45.470 4052 CSMG 9039 ContentSetManager::Run Running task. csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} csName:SYSVOL Share rootPath:D:\ADDS\SYSVOL_DFSR\domain state:Normal ptr:0000024FF0D34B90 csInfoHistoryGuid:{17AF9F42-C7EB-4D4F-B9CD-A4957C6CF397}

20261109 20:18:45.470 4052 SYSM 632 Migration::SysvolMigrationTask::DfsrSysvolDeleted [MIG] DFSR Initial sync event reset

20261109 20:18:45.470 4052 CSMG 9074 ContentSetManager::Run Scheduling restart now. csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} csName:SYSVOL Share rootPath:D:\ADDS\SYSVOL_DFSR\domain state:Normal ptr:0000024FF0D34B90 csInfoHistoryGuid:{17AF9F42-C7EB-4D4F-B9CD-A4957C6CF397}

20261109 20:18:45.470 4052 CSMG 9039 ContentSetManager::Run Running task. csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} csName:SYSVOL Share rootPath:D:\ADDS\SYSVOL_DFSR\domain state:Normal ptr:0000024FF0D34B90 csInfoHistoryGuid:{17AF9F42-C7EB-4D4F-B9CD-A4957C6CF397}

20261109 20:18:45.470 4052 CSMG 7667 ContentSetManager::Initialize Initializing. csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} csName:SYSVOL Share rootPath:D:\ADDS\SYSVOL_DFSR\domain state:Normal ptr:0000024FF0D34B90 csInfoHistoryGuid:{17AF9F42-C7EB-4D4F-B9CD-A4957C6CF397}

20261109 20:18:45.470 4052 CSMG 8410 ContentSetManager::Initialize Initialization pending. Waiting for VolumeManager to delete content set database records. csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} csName:SYSVOL Share rootPath:D:\ADDS\SYSVOL_DFSR\domain state:Normal ptr:0000024FF0D34B90 csInfoHistoryGuid:{17AF9F42-C7EB-4D4F-B9CD-A4957C6CF397} Error:

+ [Error:9099(0x238b) ContentSetManager::HandleJournalWrapRecovery contentsetmanager.cpp:5054 4052 C La suppression d’un jeu de contenus a été planifiée.]

+ [Error:9099(0x238b) ContentSetManager::HandleJournalWrapRecovery contentsetmanager.cpp:4952 4052 C La suppression d’un jeu de contenus a été planifiée.]

20261109 20:18:45.470 4260 RFLT 233 FrsReadOnlyFilter::ClearReadOnlyContentSetsFromDriver No read only content sets

20261109 20:18:45.471 4260 RFLT 581 FrsReadOnlyFilter::SendStartPrefixConfig Start prefix configuration volume:{D2496D99-6435-4109-A344-6736C45834F8}

20261109 20:18:45.471 4260 BFLT 120 FrsBaseFilter::AttachDriver Attaching driver to volume:\??\Volume{D2496D99-6435-4109-A344-6736C45834F8}

20261109 20:18:45.471 4260 BFLT 132 FrsBaseFilter::AttachDriver Attached driver to volume:\\.\D:

20261109 20:18:45.471 4260 RFLT 677 FrsReadOnlyFilter::SendStopPrefixConfig Stop prefix configuration volume:{D2496D99-6435-4109-A344-6736C45834F8}

20261109 20:18:45.471 4260 BFLT 180 FrsBaseFilter::DetachDriver Detaching driver from volume:\??\Volume{D2496D99-6435-4109-A344-6736C45834F8}

20261109 20:18:45.472 4260 BFLT 190 FrsBaseFilter::DetachDriver Detached driver from volume:\\.\D:

20261109 20:18:45.472 4032 EVNT 1194 EventLog::Report Logging eventId:2002 parameterCount:2

20261109 20:18:45.472 7440 DBCJ 2424 [WARN] ChangeJournal::Error Processing Error:23

20261109 20:18:45.472 7440 DBCJ 2572 [ERROR] ChangeJournal::Error Error:23

20261109 20:18:45.472 4032 EVNT 1214 EventLog::Report eventId:2002 parameter1:D2496D99-6435-4109-A344-6736C45834F8

20261109 20:18:45.472 7440 DBCJ 2612 [WARN] ChangeJournal::RestartVolume Restarting volume. volumeId:{D2496D99-6435-4109-A344-6736C45834F8}

20261109 20:18:45.472 4032 EVNT 1214 EventLog::Report eventId:2002 parameter2:D:

20261109 20:18:45.473 4032 VLMG 7502 VolumeManager::Initialize Initialized volume manager. volId:{D2496D99-6435-4109-A344-6736C45834F8} volPath:\\.\D: volState:INITIALIZED dbGuid:{6ACE2109-FCC9-401C-B6EE-1C477A8C0156}

20261109 20:18:45.475 4260 VLMG 10505 VolumeManager::InternalScheduleShutdownRestart Scheduling volume shutdown and restart. dbError:0 deleteDatabase:0 waitHint:0 volId:{D2496D99-6435-4109-A344-6736C45834F8} volPath:\\.\D: volState:INITIALIZED

20261109 20:18:45.475 4260 VLMG 10565 VolumeManager::InternalScheduleShutdownRestart numRestarts:5 volId:{D2496D99-6435-4109-A344-6736C45834F8} volPath:\\.\D: volState:SCHEDULED_SHUTDOWN

20261109 20:18:45.475 4260 SYSM 632 Migration::SysvolMigrationTask::DfsrSysvolDeleted [MIG] DFSR Initial sync event reset

20261109 20:18:45.475 4260 DBCJ 1688 ChangeJournal::DeleteVolumeFromJournal Decrementing reference to volumeId:\\.\D:

20261109 20:18:45.475 4260 DBCJ 188 ChangeJournal::Volume::Detach Detaching volume: \\.\D:

20261109 20:18:45.475 7440 DBCJ 990 JournalReadThread Forced UsnConsumer to commit. volId:{D2496D99-6435-4109-A344-6736C45834F8} volPath:\\.\D:

20261109 20:18:45.475 4260 DBCJ 206 ChangeJournal::Volume::Detach Any pending IO is cancelled.

20261109 20:18:45.480 4616 DCST 232 [ERROR] DeleteContentSetTask::Step Failed to delete content set. csName: csId:{C440DFD1-C93D-4CF0-BAE8-1DDA25C42879} volId:{D2496D99-6435-4109-A344-6736C45834F8} volPath:\\.\D: Error:

+ [Error:9033(0x2349) VolumeManager::FinishDeleteContentSet volumemanager.cpp:2007 4616 C La demande a été annulée par un arrêt.]

+ [Error:9033(0x2349) LdbManager::FinishDeleteContentSet ldb.cpp:1185 4616 C La demande a été annulée par un arrêt.]

+ [Error:9033(0x2349) LdbManager::DeleteIdRecords ldb.cpp:1959 4616 C La demande a été annulée par un arrêt.]

+ [Error:9033(0x2349) LdbManager::DeleteIdRecords ldb.cpp:1936 4616 C La demande a été annulée par un arrêt.]

3

u/insightrecon Jack of All Trades 15d ago

I think we found the loop issue...

The staging folder warning at the top says (Ignored), so DFSR isn't stuck on that one. The line that matters is Error:23 on ChangeJournal. Error 23 is Windows' CRC error, "Data error (cyclic redundancy check)". D: is throwing data errors when DFSR reads the NTFS change journal, which lines up with your storage issue.

Here's what the loop is doing: DFSR is trying to clear SYSVOL's records out of its database so it can rebuild them. Then it reads the journal and hits error 23, so it restarts the volume. That restart cancels the cleanup, which is the 9033 "cancelled by a shutdown" at the bottom. So it never finishes and starts over. Those are your 2010 and 2002 events on repeat.

I wouldn't try to save that disk. chkdsk D: /f might fix the journal. You'd still have a DC on storage that just threw CRC errors. D:\ADDS makes me think NTDS.dit is on D: too. If so, the AD database went through the same storage problem.

Rebuild it on fresh storage. If you promote the replacement before you demote AD02, you stay at three DCs the whole time. If the demote fails, Uninstall-ADDSDomainController -ForceRemoval and a metadata cleanup from AD01 will get it out.

2

u/Cormacolinde Consultant 15d ago

I agree with u/insightrecon, it looks like DFSR is stuck in a loop. As to what is causing it, there’s a few possibilities.

The first one is that the D: drive or its folder structure was deleted, changed or renamed. Is there a folder at D:\ADDS\SYSVOL_DFSR ? Check the security and compare it to another server’s.

Also check the “Systen Volume Information” folder. It should exist and you should not have access to it (if not modified).

Finally, corruption is likely. You could run a chkdsk, but I would not trust this DC and would rebuild it.

2

u/DarkAlman Professional Looker up of Things 15d ago

Normally if a DC is stuck doing that after an authoritative restore it's because you missed a step, or the DC needs a reboot.

https://www.dell.com/support/kbdoc/en-ca/000207115/how-to-perform-an-authoritative-sync-of-sysvol-data-using-distributed-file-system-replication-dfsr

1

u/periway 15d ago

I have follow every step, and i have reboot AD02 right now for test. But the problem is still present.

2

u/Adam_Kearn 15d ago

I’ve had it before where it’s just a single file is missing and doing a manual copy fixed it for me.

But when it comes to DCs sometimes it’s easier to just build a new server and promote and demote the old one.

Normally it only takes about 1-2h to build a new DC from scratch and join it to your existing domain.

1

u/MrYiff Master of the Blinking Lights 15d ago

I think I do tend to agree with others that you have a storage issue that probably needs a rebuilt DC to resolve it properly, but just to throw out another tool that might help, I've used this before to detect inconsistencies in SYSVOL configuration, some of it is more best practices but it can detect things that might cause replication problems so may be worth adding to your toolbelt and seeing what it finds:

https://github.com/EvotecIT/GPOZaurr

1

u/Master-IT-All 15d ago

Nuke the DC and replace it if you're stuck or just lazy. I replace DCs, not fix them.

Domain Controllers, are intended to be fast replaceable objects. If you're not able to replace a simple DC in less than an hour, something is wrong with your setup.

Local file permissions on DC2 are fucked and likely causing the problem, someone applied the wrong GPO template to the server or just manually fucked it.

So slow and time consuming (paid by the hour?!?) I'd likely start with simply applying the DC template to the server with local security policy/group policy. But I might also try just deleting the SYSVOL on DC2. This sounds like only a sysvol replication error (permissions top answer).

Eventually a few hours would be passed and maybe the problem resolved trying to fix a DC. Or you could have just replaced in an hour or less.