Skip to main content

cleanup-volumes Infrastructure App

This infrastructure app cleans up unused storage volumes.

Installation​

> app install cleanup-volumes
info

Upon installation, Fix Inventory will create a config fix.apps.cleanup_volumes.

The default minimum age threshold is 14 days. This means that if a storage volume is not in use and has not had any read or write IOPS within the last 14 days, it will be flagged for cleanup.

The age threshold is configurable via the min_age config value.

Configuration​

  1. Execute the following command in Fix Inventory Shell to open the infrastructure app configuration for editing:

    > config edit fix.apps.cleanup_volumes
  2. Update the configuration with the desired minimum age:

    cleanup_volumes configuration
    min_age: 14d
    info

    Valid age units include:

    • weeks

    • days

    • hours

    • minutes

    Age units can be abbreviated to a single letter (e.g., 7d, 24h, 60m, etc.).

    A space in between the numeric value and the unit is also optional, meaning that 7d and 7 days are equivalent.

Usage​

Run the app using the app run command:

> app run cleanup-volumes
tip

Add the optional --dry-run flag to see what commands the app would perform, without actually executing them.

note

This infrastructure app cleans up unused storage volumes with no read or write IOPS during the defined timeframe. Items tagged with expiration: never will not be flagged for cleanup.

Further Reading​