Packages failed to redistribute to distribution point with “FileOpen failed; 0x80070570”

This is another issue following my previous post “Package distribution keeps failing with “CSendFileAction::AddFile failed; 0x80070570”“. The primary server failed to distribute packages to its distribution point due to the exceptions in smsdpprov.log on the distribution point:

[13B0][Thu 05/14/2020 10:07:51]:FileOpen failed; 0x80070570
[13B0][Thu 05/14/2020 10:07:51]:CContentDefinition::CreatePackedSignature failed; 0x80070570
[13B0][Thu 05/14/2020 10:07:51]:Failed to create packed signatures for content ‘a4e5db1b-4b44-4c84-82a3-4586628003d2’ for package ‘CAS007C6’. Error code: 0X80070570
[350][Thu 05/14/2020 10:14:36]:CreateFileW failed for D:\SMSSIG$\CAS00850.6.tar

0X80070570 refers to “The file or directory is corrupted and unreadable”. When I used PsExec to connect to the remote distribution point as system account and created a file by

PsExec -s \\dpserverCMD
fsutil file createnew D:\SMSSIG$\test.txt 1024

I could create successfully the test.txt file in D:\SMSSIG$. However, the file test.txt is not visible in D:\SMSSIG$ directory in the file explorer. The strange thing is that the test.txt could be opened if I put in the address bar in the file explorer D:\SMSSIG$\test.txt and pressed enter.

What is going on? I scratched my head. Then I tried to look for the ghost file from the command prompt:

dir D:\SMSSIG$ | findstr test.txt

Guess what? The file could not be found! This can explain the exceptions in the smsdpprov.log. It can be deduced that there is something wrong with the directory SMSSIG$. So, I turned to the System event log and came across the following information:

Log Name: System
Source: Ntfs
Date: 2020/5/12 15:59:47
Event ID: 55
Task Category: None
Level: Error
Keywords:
User: SYSTEM
Computer: dpserver.contoso.com
Description:
A corruption was discovered in the file system structure on volume D:.
A corruption was found in a file system index structure. The file reference number is 0x20000000000ac. The name of the file is “\SMSSIG$”. The corrupted index attribute is “:$I30:$INDEX_ALLOCATION”.

Ntfs 55 indicates that file corresponding metadata was damaged when the system accesses the file. Based on this information, I ran the following commands to fix the drive:

  1. Scan the problematic disk completely
chkntfs D: >C:\chkntfs.txt
chkdsk D: /scan >C:\chkdskscan.txt
  1. After Step 1 completes, run CHKDSK command to attempt to fix the corruption
Chkdsk D: /f /r >C:\chkdskresult.txt

Note: When the volume is in use, chkdsk will prompt the following to unmount the volume, we need to manually enter Y to process the dismount operation. The operation will not be displayed, you need to enter Y manually, the chkdsk command can continue to execute. You can refresh the file and then double click to open the file to view the command execution. You can also use CMtrace to view the file.

Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N)

During the process, if you see

there is an active paging file on it. Would you like to schedule

just put in Y, which means “schedule this volume to be checked the next time the system restarts”. Then restart the machine and the CHKDSK will run automatically on reboot.

After this operation, packages distribution returned back to normal. Regarding the failed packages which count as many as over seventy, I used this modified script to redistribute the packages in batch.

Redistribute Failed packages in SCCM

Kindly test your environment before using production.

The script will check specified DP for packages that has failed according to summarizer events and redist any failed packages.

When working with ConfigMgr you always end up distributing content to several DPs. This normaly goes off without a hitch but from time to time this fails. If you then have several DPs spread across a large geographical area, WAN links may be questionable. So when a package then fails most are not happy to redistribute the content to all DPs again.

Function Update-ContentForSingleDP{
param (
[Parameter(Mandatory=$true)]
$SiteCode,
[Parameter(Mandatory=$true)]
$DPFQDN
)
$Failures = Get-WmiObject -Namespace root\sms\site_$SiteCode -Class sms_packagestatusDistPointsSummarizer | Where-Object State -GT 2 | Where-Object SourceNALPath -Match $DPFQDN 
$DP = Get-WmiObject -Namespace root\sms\site_$SiteCode -Class sms_distributionpoint | Where-Object ServerNalPath -match $DPFQDN
foreach ($Failure in $Failures) { 
    $PackageID = $Failure.PackageID 
    Write-Output "Failed PackageID: $PackageID" 

    $DPPackage = $DP | Where-Object PackageID -EQ $PackageID 
    $DPPackage.RefreshNow = $true 
    $DPPackage.put() | Out-Null
}
}

Note that here I assume that objects whose State is greater than 2 are failed packages instead of the original -EQ 2 in the MSDN script because some failed packages have other values grater than 2.

References

Design a site like this with WordPress.com
Get started