Cleanup of MMC Service areasPermanent link for this heading

Last updated: 26 March 2024 (cf)

SummaryPermanent link for this heading

Files in the MMC Service areas are not deleted during normal operation to preserve past MMC data in case of a required database restore.

For cleaning up those MMC Service areas the tool fscadmin is used. This tool deletes all files in the targeted MMC Service or MMC Service area that are unreferenced in the database.

InformationPermanent link for this heading

The tool fscadmin is installed with the Fabasoft Server Management.

By calling fscadmin.exe (Windows) respectively fscadmin (Linux) the command-line help is displayed.

For general information about fscadmin see the article How to use fscadmin.

Hints for Linux usage of fscadminPermanent link for this heading

  • Under Linux, fscadmin needs to be called as fscsrv user.
  • In Linux you might need to set the --host and --port parameter. Host and port are the listen hostname and port of COO Service 1. For example:
    fscadmin --host foliobe1 --port 18070 --action list

Parameter overview for cleanupPermanent link for this heading

This overview only considers parameters required for the cleanup process.

Some parameters of the cleanup action are releated to backup and recovery and are also skipped in this article.

fscadmin <arguments>

Arguments:

  • -a|--action cleanup Type of action to execute
  • -s|--service <service> Execute against this service (the ID of the specific MMC Service)
  • -t|--time <days> Cleanup unreferenced files saved before now-days. This will keep the files change in the last <days> days, to allow point-in-time recovery of the database without restoring the MMC Service areas.
  • [-l|--logfile <log>] Path to logfile (default: fscadmin.log). You should consider to use a separate logfile for each MMC Service.
  • [-d|--areadir <name>] Cleanup specified area. The name specified is the unique “Name” of the MMC Service area. Use this to reduce the required time. Active areas commonly store more unreferenced files than closed areas.
  • [-c|--casrange <start>-<end>] Restrict to the directories specified by the range (format: xx-xx; e.g. 00-3f). This is another option to reduce processing time. Use this to alternate different ranges on different executions, e.g. 00-3f, 40-7f, 80-bf, c0ff)
  • [-v|--verboselog] Log detailed information. The log will contain the specific filenames that have cleaned up.
  • [--casdeletion <directory>] By default, casdeletion logs are saved to the logs\casdeletion\ folder in the MMC Service path. Write additional casdeletion logs to another directory
  • [-u|--dryrun] Only generate logs as if actions are performed. You can use this to test, what files would be cleaned up.
  • [-h|--host <ip>] IP address or hostname of the host of COO Service 1 (COOSVC1). (Linux only)
  • [-p|--port <port>] TCP port of COO service, usually 18070. (Linux only)

Please consider that some of the parameters are not available in older Fabsoft Folio versions.

Finding out the ID of a specific servicePermanent link for this heading

The --service parameter specifies the concerning MMC Service by it’s service id (instance number) or object address. You’ll find the service id in the Domain Administration / Services as “Instance Number”.

If you don’t have access to the web interface, you can aquire the service list with id’s with the following command:

fscadmin --action list

Cleanup of all areas of an MMC ServicePermanent link for this heading

This is the shortest possible commandline for cleaning up a full MMC Service:

fscadmin --action cleanup --service 2 –time 7

  • --service 2 executes the cleanup against all MMC Service areas of MMC Service with ID 2.
  • --time 7 restricts the cleanup to files older than 7 days.

You need to call the cleanup for every MMC Service separately.

Cleanup of single area of an MMC ServicePermanent link for this heading

Cleaning up a single area of an MMC Service allows you to alternate, e.g. different areas on different weekends. Typically, the current (active) area produces more unreferenced files as the users are working in this area. Closed areas produce less unreferenced files.

The name of the area refers to the “Name” column inside of the MMC Service.

fscadmin.exe --action cleanup --service 2 --areadir MMCSVC1_2 --time 7 --logfile C:\temp\MMCSVC1_2.log

  • --areadir MMCSVC1_2 restricts to the specific MMC service area
  • --logfile C:\temp\MMCSVC1_2.log logs to the specified file. We recommend setting the logfile parameter for an easier analysis in case of an error.

Partial cleanup in CAS areasPermanent link for this heading

Another way to alternate the cleanup is to specify a casrange in the CAS area. CAS uses directories from 00 to FF (hex). You can limit the cleanup to a specific range.

fscadmin.exe --action cleanup --service 2 --areadir MMCSVC1_2 --casrange 00-7f --time 7

  • --areadir MMCSVC1_2 The casrange parameter does not explicitely require the areadir parameter, but makes sense to reduce the amount of cleanup time.
  • --casrange 00-7f cleans up the first half of the CAS area (00-7f, 80-ff). Limit the range you your needs.

Test cleanup with dryrunPermanent link for this heading

Adding the parameter --dryrun to the parameter list will execute the cleanup processing but skips the actual deletion of the files. A logfile also will be created.

Best practices for cleanupPermanent link for this heading

  • Cleanup your MMC Service areas in off-peak times, as the cleanup will produce some database and file system load.
  • The Fabasoft Folio Backendservices need to be up and running during cleanup.
  • Most customers do the cleanups via script during the weekend. Alternating the cleanups (different services, different areadirs) may be used to reduce runtime.
  • The first call of a cleanup may take quite longer, as more files need to be processed. Following cleanups will perform faster.
  • No data are lost and no inconsistency will occour if you cancel or kill the cleanup process.
  • Closed MMC Service areas expectedly will clean less unreferenced files than active areas. Therefore, less frequent scheduling of closed area cleanup has little impact to storage usage.
  • In the case of a nearly full MMC volume, consider to run a cleanup to release used space.
  • Not running cleanup for around a year may release around 2/3 of the used space in active areas.
  • Files saved in a Fabasoft Folio version (time travel feature) are by design not deleted by the cleanup (as the versions of the objects reference these files).

Frequently encoutered errorsPermanent link for this heading

  • Execution failed. (No method found for action "COOSYSTEM@1.1:CleanupContentAreas" in object class "COOSYSTEM@1.1:COOService")
    Reason: The target service is a COO Service (but should be an MMC Service).
  • Error: Service not found
    Reason: Target service ID is not existant
  • Action not supported
    Cause: Spelling mistake at the parameter --action
  • Error: MMC Service MMCSVC1 is locked by System Administrator
    Cause: You have locked the MMC Service object in the web interface

ReferencesPermanent link for this heading

Applies toPermanent link for this heading

  • Fabasoft Folio
  • Fabasoft eGov-Suite

Download PDF

Download PDF