4.4. Cleaning Up Unused Files

The EKM Data Directory stores all the files that are uploaded to EKM. When files are deleted from EKM, they are not immediately removed from disk, but instead are marked for garbage collection. Garbage collection is a process that you can run to remove these files from disk.


Important:  In order to control the size of the EKM Data Directory, you should periodically run the garbage collection process to delete files that are no longer needed. This is referred to as "cleaning" the EKM data directory. Note that the dataStoreGc scheduled task (see Scheduling Automatic Tasks (<scheduledTasks>)) performs this same operation. If dataStoreGc is running on a regular schedule, you may not need to run the cleanup from this interface.


To clean the EKM data directory:

  1. Sign in to EKM Server Administration. See Signing In and Out of EKM Server Administration for details.

  2. Click the Clean Up Unused Files button in the EKM Server Administration window. The Clean Up Unused Files dialog box appears.

    This dialog has two display modes. What is displayed depends on whether or not garbage collection is already in progress.

    If garbage collection is not currently running, the dialog displays information about the last time you cleaned the EKM data directory. It shows the time that the garbage collection started, when it finished, and the number of unreferenced files it deleted.

    Figure 4.3:  Clean Up Unused Files Dialog Box

    Clean Up Unused Files Dialog Box

  3. To start garbage collection, click Start Cleanup. This starts a garbage collection task on the EKM Server and closes the dialog box. The task runs in the background so that you can continue to work in EKM or sign out. To monitor the progress of the garbage collection, click the Clean Up Unused Files button at the bottom of the EKM Server Administration window. This opens the dialog box again. If garbage collection is still running, a snapshot of its current status is displayed in the Garbage Collection dialog box.

    You will see two possible status messages depending on what stage the garbage collection is in:

    • Scanning files. n nodes completed.

    • Deleting unreferenced files.

    In the first stage, the garbage collection scans through all the nodes in the database. The Garbage Collection dialog reports the number of nodes that have been scanned so far. After the scanning stage is complete, it begins a final stage where it deletes all unreferenced files from the EKM data directory.


Note:  To ensure consistency during restore, and to prevent accidental deletion of files that have not yet been committed, an unreferenced file may not be deleted if it was added or accessed recently. See the description of the dataStoreGC setting in Scheduling Automatic Tasks (<scheduledTasks>) for more details.



Release 18.2 - © ANSYS, Inc. All rights reserved.