In this video I'll be ensuring that automatic
archive creation is enabled on my PI Data Archive
2015 R2. It's important to have
automatic archive creation turned on because over time
as our archive files fill up, new files are needed
to hold new incoming data. Here in
PI System Management Tools under
Operation, Archives, my top entry is my
primary archive and we can see that it is
40% full. Once this primary archive fills up, the
PI Data Archive will either look for a blank or old archive file to
write to or temporarily reject new data
until it has an archive file with enough space.
PI administrators used to have to monitor their primary
archives to predict when archives would fill up to make sure
that there are empty shift-able archive files ready to
become the new primary archive. As
of PI Data Archive 3.4.375,
the PI Data Archive is able to detect when the
primary archive is close to filling up and if properly configured, it
can automatically create a new primary archive to
accommodate an archive shift.
If you aren't sure if your PI Data Archive is late enough to support
automatic archive creation, down here in the version
window, you can see the versions of your PI Data Archive
subsystems.
Here mine are all well above 3.4.375
Now that we are sure of the
PI Data Archive's version, the best way to make sure
automatic archive creation is turned on is
under operation, tuning parameters and then in the archive tab.
Here the tuning parameter
archive, auto archive file root
acts as a switch for automatic archive
creation. Having a 0 or a blank in this value will
disable automatic archive creation. But having a file path
followed by the prefix of a file name will enable it.
Because there is a file path here
and the start of a file name, automatic archive creation
is already turned on. And if we navigate
to our C: PIARC folder,
we can see that automatic archive creation has already been creating our files
for us. There is an important change however,
and that is that my archives have been automatically created
on my C drive. Because of the PI Archive
files are read and written to a lot,
putting the operating system and archive files on different
hard drives is important to maximize the performance of our
disk's read and write operations. As we can
see, I do have a designated D drive for my archive files.
So back in System Management
Tools, I can change my auto archive file root
to point to the D drive instead. Because these
are automatic archive creation parameters,
this change won't actually take effect until the next
time an archive is automatically generated.
Auto archive file format and auto archive file extension
will influence the name of your automatically created archives.
Auto archive file format will let us choose
between 1 of the 3 timestamp formats down here in
its description pane. And automatic archive file
extension will append that file format with an
extension. Given my current combination
of auto archive file root, file format and
file extension, if an archive was automatically
generated right now, it would be in the
D drive under PIARC and it would be
named LRNPISRV
_year-month
-day_
hour-minute-
second.arc
When new archive files are auto created, the
tuning parameter auto archive file size determines
their fixed size. The default is 0 which is outlined
in the description at the bottom will cause any automatically
created archives to reflect the size of the
current primary archive. We set the default in this
way so that if you change the size of your primary
archive manually, all subsequent automatically
created archives will continue to reflect the new
size without having to remember to change this parameter.
If you do intend to change the size of new archives,
I recommend that you instead follow the procedures in
our Live Library to manually create
a new archive.
And use the archive size guidelines
here also in our Live Library.
Back in PI System Management Tools,
our primary archive is still pretty far from filling up. And
it's still on the C drive because like I
said earlier, none of our automatic archive creation tuning parameters
will take effect unless an archive is automatically created.
Rather than waiting for this archive file to
fill up and have the PI Data Archive create a new
archive file on the drive automatically, we can right
click to force an archive shift right now to test our automatic
archive creation. During this shift,
the PI Data Archive will give my previous archive file
an end time and create a new primary archive file with
an end time of current time and with a specified
root path on the D drive.
If I manually navigate
to this folder, we can see that our archive file
has automatically been created in this new
PIARC folder on the D drive. So we can confirm
that we are successfully automatically creating our new
archives on the D drive, separate from our Operating System.
This was a successful automatic
archive creation and archive shift, but sometimes
an automatic archive creation can fail. For instance
if the PI Data Archive tries to create a new archive file on a
hard drive without enough space.
When an archive auto creation fails and there are no
archives to shift to, as of PI Data Archive
3.4.380 SP1, the default
behavior is for your PI Data Archive to
hold the event in the event queue until there is an archive with space
available. However in 3.4.380,
the default behavior was to shift to and to
begin to overwrite your oldest archive file.
The tuning parameter, archive overwrite data
on auto shift failure is responsible for controlling this
behavior and is hidden in PI System Management Tools by default
because we strongly believe that holding data in the event queue
is preferably to overriding your old archives.
If you want to review this tuning parameter
or to find other further reference material
on automatic archive creation, visit the PI Server 2015
documentation in our Live Library. And seek out the
manage automatic archive creation section.
In the next video I'll be showing you how to
move the rest of your archive files to the
C drive to my new archive folder on the D drive where my new
primary archive is. This move procedure, I'll show you,
can also be used to decommission archives or to relocate them
if you need to free up disk space.