The pi archive file is stored on the hard disk.I would like to know how to set to delete or overwrite the archived files that are saved when the hard capacity exceeds a certain amount.
How can I set like that to DB Server PC.
Hi, Kwang.It sounds like you want the data archive to start overwriting the oldest archive file when the disk volume becomes full, is that correct? If so, then the tuning parameter you are looking for is Archive_OverwriteData OnAutoShiftFailure. Note this type of behavior is disabled by default because it is almost always preferred to queue data in the event queues, which should be on a different volume from the archive files, than to delete older data, but this may not be the case for something like a development system. You can find more info on auto archiving behavior and how to use this tuning parameter in the following references:Older versions of the PI Server Management Guide (2015 R2 and before), for example: PI Server
This video (specifically, around the 5:32 mark, but I recommend the whole thing): https://www.youtube.com/watch?v=aKbFMMDk3iI&list=PLMcG1Hs2Jbct8OTUzTZKs11RtQXZ_017C&index=2
This KB article: https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=3122OSI8 Note also the the tuning parameter, Archive_LowDiskSpaceMB, can also play a role; see below article for more info:https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=Volumeforwherethedynamicprimaryarchiveislocatedisru…
Please let us know if you have any further questions and if you need more guided instructions, please contact Tech Support.
Thank you first for your help Brent.However, what I want is not to fill up full the hard disk capacity, but to operate when it is over a certain percentage that I set.
How can I set the desired value and set the behavior mentioned above?
The information above should be sufficient to answer the question, but there are a couple of different ways to set this up depending on you final goal.
First off, is it safe to assume that you want to do this on a development environment and not production? For a production system, we don't recommend overwriting older archives; there are alternatives such as running a script to unregister and move older archives to alternative storage to free space on the archive drive. If you are testing this in a development environment, then here are a couple of approaches I thought of:
1. If you know how much space on disk you want the archive files to occupy, then you can create empty archives to fill this amount of space; for example, if you only want 20 GB of archives, you could create 20, 1 GB archives. If you disable auto-archiving (i.e., make sure no root path is defined for tuning parameter Archive_AutoArchiveFileRoot). The system will start to fill the archives over time and when it fills the last empty archive, it will loop back around, clear the oldest archive, and start using it as the new primary archive.
2. If you want to leave a specified amount of disk space free from archive utilization, then you could turn on auto-archiving, set Archive_OverwriteDataOnAutoShiftFailure to 1, and set Archive_LowDiskSpaceMB to the minimum amount of disk space you want to check for before auto-generating a new archive for a shift. With this setup, the system would continue to create archives automatically until the free space on the disk is less than (Archive_LowDiskSpaceMB + Archive_AutoArchiveFileSize). At that point, auto-archive creation would be blocked and since Archive_OverwriteDataOnAutoShiftFailure = 1, then it would fall back to selecting the oldest archive and overwriting it.
Note: I ran a few tests of these methods on PI Data Archive 2018 SP3 and they worked as expected, but results may vary on other versions so be sure to have backups before starting your tests.
Retrieving data ...