Today I'll be showing you how, starting with version
2016, the PI Data Archive automatically
detects and flags corrupt archives. I'll also
show you how you can use PI System Management Tools to
reprocess archives online. Let's
start with archive corruption. An archive file is
corrupt if a record in the archive file is inaccessible
meaning that you can't write data to it
or read data from it. What does this look like? Well let's
look at this PI ProcessBook Display that has two PI Points in a trend.
You see that for one of our PI Points, we actually
have a large data gap. In our case this data
is stuck in an archive which is corrupt.
Archive corruption is fairly rare but it can occur
if for example an archive file is being written to
when a server unexpectedly shuts down. For example
due to a power outage.
With version 2016, the Archive Subsystem
automatically detects if a read or write operation
to an archive file failed and it will flag
that archive as corrupt. So let's say
that you are a PI System Administrator and you
suspect archive corruption. Well what you can do is
open up PI System Management Tools to diagnose
this issue.
You can go to Operation and then Archives.
You'll get a pop-up message that will tell
you if any of your archives have been flagged as corrupt.
One important thing to keep in mind
is that not all archive corruptions
are detected in this release. So if you suspect
an archive corruption but none of your archives have been flagged,
please refer to the previous video
and to KB article 2367OSI8
to diagnose the issue.
So now I have a list of corrupt
archives. I can click OK if I want to
reprocess them right away. I can also
select which archive files I want to reprocess.
Finally what I can do is just click on remind me later.
So I'll say remind me later.
Now I see that I have a column called
corrupt which shows me which of my archive files was flagged
as corrupt. Let's say I now want
to reprocess my archives. I can select them
and I'll see that I have access to a new
button on the top
left which is called Reprocess Selected Archives.
One thing that you'll notice is that you can actually
select any one of your archives, not just the corrupted
ones, and this button will be available.
So what does this button do? Well it takes your archives
and it will take a copy of them and it
will reprocess them into a new archive
with the same start time,
end time and size. Merging and
splitting archives is not supported in this release.
These features are still available using our offline
tools. So if that's what you'd like to do, please
refer to the previous video.
Alright so I'm going to start reprocessing my archives.
We'll see that my reprocessing
is being tracked in the window below called
Online Reprocessing.
What's the difference between online and offline reprocessing?
Well in offline reprocessing, as described
in the previous video, you have to select your archive,
you have to unregister it which means
the Archive Subsystem is no longer managing it, and then
you have to use a command line utility to reprocess your archive
which is kind of a complicated procedure.
But now it's much easier, not only can I do it
in PI System Management Tools, but I also still have access
to the data in this archive file. You'll see
that I can still see the data for the other PI Point
which was not in the corrupt record. Another important
advantage to online reprocessing is
you don't lose any data. Any data that is
supposed to go into the reprocessed archive
will actually wait in memory until the reprocessing
has been completed. So let's go back to PI System
Management Tools and we'll take a look
at our reprocessing. You might be wondering
how long is this reprocessing going to take? Well
it kind of depends on a lot of factors. It depends
on the size of the archive, it depends on how much data is in that archive
and it also just depends on your
server's performance. But do keep in mind that this process
will take some time. One last thing I want to point out is that
this process is not available for the
primary archive. If I select the primary archive
we'll see that the reprocess selected
archive button is greyed up.
If you need to reprocess the primary archive, for
example if it's corrupt, you'll need to stop the
Archive Subsystem and use the offline
reprocessing utility. Another option is to select
your primary archive which is corrupt and force
an archive shift using the Force Archive Shift button.
This will create a new
primary archive and your old primary archive that is corrupt
will no longer be primary. So you can use the method
described here. Alright it looks like our
reprocessing was a success and we can see the status
of our reprocessing right here.
And we can also see that we no longer have
any archives that are flagged as corrupt.
The final test of course is to go see
whether we can access our data. So I'm going to
go into PI ProcessBook and refresh this trend.
As you can see I now
have access to the data in those archives, so they are
indeed no longer correct.