Image Registry Directory Size is Increasing Continuously

Problem

Platform9 default image registry is increasing its size. As it contains multiple hash values for the images not in use. The default path for the same is "/opt/pf9/images/data/docker/registry/v2/blobs/sha256" directory.

Environment

  • Platform9 Managed EdgeCloud - Airctl - 5.3.0

This is observed on the airclt version 5.3.0-2075501 - customer was trying to use this default Platform9 directory to store application images.

Cause

  • Monitor the directory /opt/pf9/images/data/docker/registry/v2/blobs/sha256 .
  • The default garbage collector doesn't clean up this directory as it is not owned by docker. This directory keeps increasing its size.

Resolution

There are two methods to resolve this issue:

  1. Remove the entire directory used by the registry and push just Platform9 images back in again.
  2. Resize the disk on the DU VM from the default 60G disk to further based on space available on the DU host.

Following are the steps for above two methods:

I. Remove the entire directory used by the registry and push just Platform9 images back in again.

  • Run below commands inside the DU VM:
On DU VM:
Copy

After registry is restarted:

  • Run image push command from DU host:
On DU Host:
Copy

Once images are pushed to DU VM, you can verify default images at "/opt/pf9/images/data/"

II. Resize the disk on the DU VM from the default 60G disk to further based on space available on the DU host.

  • Set the duDiskSize field in airctl to desired value, this is supported in airctl. Update this values in "/opt/pf9/airctl/conf/airctl-config.yaml" file. In our example we are trying to update it to 70G. It looks like below:
On DU VM - duDiskSize - snippet
Copy
  • Once you have updated the values in airctl-config.yaml. Please run below command on DU host.
On DU host
Copy
  • Followed by airtctl stop and start
Airctl stop - start
Copy

Please verify if new size is getting reflected.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard