This section explains how to configure automated removal of cached data from spoke portals and how to remove cached directories and files from spoke portals by using the qq CLI.

Before you can configure spoke portal cache management, your Qumulo cluster must have an active portal relationship.

How Cache Management Works in Qumulo Core

By default, Qumulo Core automatically recaches data on spoke portals upon access and maintains a minimum of 5% free capacity on clusters whose spoke portals contain cached data. Qumulo Core removes cached data in the background until it meets its configured free threshold or until it removes all cached data from the spoke portals.

You can configure the automated removal of cached data or remove cached data from spoke portals by using the qq CLI.

Configuring Automated Removal of Cached Data from Spoke Portals

This section explains how to configure automatic cache management for active spoke portals. To control automatic cache management, you can configure a free threshold. For example, if you set the free threshold setting to 0.05, Qumulo Core begins to remove cached data from spoke portals when the system is 95% full.

  • To view the current free threshold, run the qq portal_get_eviction_settings command.

  • To configure the current free threshold, run the qq portal_set_eviction_settings command and specify the free threshold value as a decimal between 0.0 and 1.0. In the following example, Qumulo Core begins to remove cached data from spoke portals when the system is 80% full.

     qq portal_set_eviction_settings \
       --free-threshold 0.2
    

Removing Cached Data from Spoke Portals by Using the qq CLI

This section explains how to free capacity by removing a cached directory, file, or a child file or directory linked to a parent directory.

To Remove a Cached Directory

  1. Ensure that the jq tool is installed on your system.

  2. To determine the spoke ID, run the qq portal_list_spokes command and compare the spoke portal root directory to the path of the cached directory to be removed.

  3. To determine the ID of the directory to be removed, run the qq fs_file_get_attr command and pipe the output to the jq tool. For example:

    qq fs_file_get_attr \
      --path /portals/seattle/media/ | \
        jq .id
    
  4. Run the qq portal_evict_tree command and specify the spoke ID and directory ID. For example:

    qq portal_evict_tree \
      --spoke-id 3 \
      --dir-id 29710
    

    Qumulo Core begins to remove the cached directory. The following is example output.

    {
      "monitor_uri": "v1/tree-delete/jobs/29710"
    }
    
  5. To view the status of the removal process, run the qq tree_delete_get command and specify the directory ID.

    The following is example output.

    id         initial_path            mode
    ===== ...  =============           ===============
    29710      /portals/seattle/media  PORTAL_EVICTION
    

To Remove a Cached File

  1. Ensure that the jq tool is installed on your system.

  2. To determine the spoke ID, run the qq portal_list_spokes command and compare the spoke portal root directory to the path of the cached file to be removed.

  3. To determine the ID of the file to be removed, run the qq fs_file_get_attr command and pipe the output to the jq tool. For example:

    qq fs_file_get_attr \
      --path /portals/seattle/project.xml | \
        jq .id
    
  4. Run the qq portal_evict_data command and specify the spoke ID and file ID. For example:

    qq portal_evict_data \
      --spoke-id 3 \
      --file-id 14560
    

    The cached file is removed. The following is example output.

    {
      "evicted_blocks": 5000
    }
    
  1. Ensure that the jq tool is installed on your system.

  2. To determine the spoke ID, run the qq portal_list_spokes command and compare the spoke portal root directory to the path of the of the child file or directory to be removed.

  3. To determine the ID of the directory whose cached link to a child file is to be removed, run the qq fs_file_get_attr command and pipe the output to the jq tool. For example:

    qq fs_file_get_attr \
      --path /portals/seattle/ | \
        jq .id
    
  4. Run the qq portal_evict_link and specify the spoke ID, the directory ID, and the name of the cached child file or the path of the cached child directory to be removed. The following example specifies the file project.xml.

    qq portal_evict_link \
      --spoke-id 3 \
      --dir-id 54890 \
      --name project.xml
    

    The following is example output.

    {
      "evicted_blocks": 2
    }