Troubleshooting
Why PI collective archives corrupt on both members
Short answer
Two archives that cover overlapping time stamps cannot be merged, so syncing the members' data into one history is not the fix. Reprocess each corrupt archive on the member that holds it, shifting first when it is the primary, active archive, then fill only the ranges that remain empty from the other member's good archive, as KB 3108OSI8 documents. Then hunt the shared root cause: two members corrupting together almost always share a storage, backup or power dependency.

On this page
Random archive corruption on both members of a PI collective is one fault with two symptoms, and merging the servers' data is not the repair. Two archives that cover overlapping time stamps cannot be merged into one, so the committed path is: reprocess each corrupt archive on the member that holds it, shift first when the damaged file is the primary (active) archive, then fill only the time ranges that stay empty from the other member's good archive, as KB 3108OSI8 documents. That restores the history. Stopping the corruption is a separate root-cause hunt, and with two hosts failing on the same pattern, you start at what they share.
Confirm the damage before touching anything #
A corrupt archive announces itself as trends with holes, flat lines or missing values over one time range, or as data that changes depending on which member the client lands on, while live values stay healthy — the same gap-with-good-live-data signature behind why PI shows live values but no trend history.
Before repairing, turn the symptom into a location. Read the exact error text in the PI message log and in Windows Event Viewer on each server, and write down the archive file and its start and end times. Then sort the damage into one of three cases:
- A gap on one member only, while the other trends fine: local archive damage. The other member holds a good copy of that range, which becomes your fill source.
- The same gap on both members: the data never arrived. This is source-interface buffering or an upstream outage, not archive corruption — go to the interface logs, not the archive tools.
- Different corrupt ranges on each member: independent damage per host, which points at a shared environmental cause covered in the root-cause section below.
Record the PI Data Archive version on both members and confirm they match; a version mismatch inside one collective is a cause you rule out before anything else. For each corrupt file, note whether it is the primary (active) archive or a historical one — that single fact decides whether a shift comes before the reprocess.
Why merging the two members' archives is off the table #
The natural question is whether the good data on the primary and the good data on the secondary can be synced or merged into one complete history. It cannot: archives that cover overlapping time stamps cannot be merged, and in a collective both members record the same time ranges, so their archives for a given period overlap. The supported options compare like this:
| Approach | Handles overlapping time stamps | Recovers data inside the corrupt file | Main risk |
|---|---|---|---|
| Reprocess the corrupt archive | Not applicable — one file | Yes, makes the archive readable again | The primary archive must be shifted first |
| Fill missing archive gaps (KB 3108OSI8) | No — targets ranges with no archive | No — only fills absent ranges | A wrong source archive writes wrong history |
| Merge two overlapping archives | No — not supported | No | Do not attempt it |
Decision: reprocess every corrupt file first, on each member that holds one. Reprocessing is the primary repair because it makes the damaged file readable again; the gap-fill covers only what reprocessing leaves empty.
Repair each corrupt archive, member by member #
- Identify each corrupt archive file and its start and end times from the PI message log and the archive list, and mark it active or historical.
- Copy the corrupt archive file and its related files aside before changing anything. A failed repair must never cost you the only copy — this is the one step you do not skip.
- If the file is the primary (active) archive, perform an archive shift first. The active file is still taking writes, and reprocessing it unshifted runs against incoming data.
- Reprocess the file. Open the Archives tool under Operations in PI SMT: corrupt archives are flagged there, PI SMT prompts you to reprocess them, and the reprocessing runs while the archives are online.
- Confirm the reprocessed archive is registered and appears in the archive list with the expected time range.
- For any range still empty, fill the gap per KB 3108OSI8, sourcing exactly that range from the other member's good archive. Copying history between servers carries its own gap risks — the failure mode covered in historian gaps after copying history blocks between servers.
- Repeat the sequence on the other member independently. Archives are per-server files, so a repair on one member does nothing for the other. A member that is refusing new writes has a different fault entirely — that write path is covered in troubleshooting AF SDK writes to PI collective members.
- If reprocessing fails or the file stays unreadable, stop and open a case with OSIsoft Tech Support. Do not improvise a repair on the last copy.
A worked repair with real times #
Illustrative example, not a measurement. Both members shifted at 14:00, so on each server the archive covering 06:00 to 14:00 is historical, and both copies of it are flagged corrupt.
- Overlap check first: the two files cover the same range, so the overlap is 14:00 − 06:00 = 8 hours. Any overlap at all rules out a merge; this much of it settles the question — repair, do not merge.
- Neither file is active, so no shift is needed on either member. Copy both aside, then reprocess each on its own server; PI SMT flags both and reprocesses them while they are online.
- After reprocessing, the secondary's file reads complete. The primary's file is readable but empty from 08:10 to 08:40.
- Missing range: 08:40 − 08:10 = 30 minutes. Fill exactly that range on the primary from the secondary's repaired archive per KB 3108OSI8, and take nothing else, because the primary's own data is the correct history everywhere else.
- Result: both members hold complete, matching history for the day, and the corruption timestamps from both message logs feed the root-cause hunt.
Find the cause both members share #
Repairing files resets the clock; it does not stop the corruption. Archive files are written continuously, so anything that interrupts, locks or damages a file mid-write corrupts it — and two servers corrupting on the same pattern almost always share the thing doing it. Work the list:
- Unclean shutdown or power loss: unexpected-shutdown events in Event Viewer near each corruption time; check whether both servers share a feed or UPS.
- Storage faults — disk, controller, SAN, VM datastore: disk and storage errors in the system log plus the storage vendor's diagnostics. If both members sit on the same hypervisor, datastore or array, start here.
- Antivirus or backup software touching open archive files: check the exclusion lists, then correlate scan and backup schedules against the corruption timestamps.
- Corruption at a repeatable time of day: line the timestamps up against scheduled tasks, backup windows and archive shift times.
- Version mismatch: both members must run the same PI Data Archive version — the check you already made above.
- New versus long-standing: date the first occurrence against recent patching, migration or storage changes.
- Where the corruption coincides with a plant event, trend the process data leading up to it; the root cause analysis view in a PI client such as PI Vision shows data for the period before an event, which dates the trigger when the logs alone are ambiguous.
Verify both members hold the same good data #
- No new archive errors in the PI message log or Event Viewer on either member after the repair.
- The archive lists on both members show the expected files covering the repaired range, with no unexplained gaps.
- Trend one representative tag set across the repaired range from a client connected to the primary, then to the secondary; values and time stamps must match. If your client will only attach to one member, fix that first — the causes are covered in when PI Vision connects to only one PI Data Archive.
- The version check from the first section still passes.
- Monitor through at least one archive shift and one scheduled backup window, then read the logs again. Silence across both events is the pass.
Two members corrupting together is a shared-cause problem wearing an archive-repair costume: repair with reprocess-then-fill, then spend the real effort on the shared dependency, because that is where the recurrence stops.
Questions asked
Does reprocessing recover every value inside a corrupt archive?
No. Reprocessing rebuilds the file so it becomes readable again, but values that were never fully written to disk are not recreated. Those exist only on the other member's copy of the same time range, which is why the gap-fill step follows reprocessing instead of replacing it.
The corrupt file on the secondary is a historical archive. Does it need a shift too?
No. The shift exists only to move incoming writes off the active primary archive before reprocessing. A historical archive on either member no longer takes writes, so after copying it aside you reprocess it in place.
Should I disable antivirus on both servers to stop the corruption?
No. Disabling protection wholesale leaves the servers exposed and proves nothing. Add the archive file locations to the antivirus and backup exclusion lists instead, and first correlate the scan and backup schedules with the corruption timestamps to confirm the software is even involved.
Both members corrupt within the same minute. Where do I look first?
At what they share. Simultaneous failure of two otherwise independent servers points at a common SAN, VM datastore, hypervisor, backup job or power feed, so read the storage and system events on both servers at the corruption time before you touch a single archive file.


