diff --git a/disconnected/mirroring/about-installing-oc-mirror-v2.adoc b/disconnected/mirroring/about-installing-oc-mirror-v2.adoc index 7c7fe06a61..1c21fcb5ad 100644 --- a/disconnected/mirroring/about-installing-oc-mirror-v2.adoc +++ b/disconnected/mirroring/about-installing-oc-mirror-v2.adoc @@ -89,6 +89,12 @@ After your cluster is configured to use the resources generated by oc-mirror plu // workflows of delete feature include::modules/oc-mirror-workflows-delete-v2.adoc[leveloffset=+1] +[role="_additional-resources"] +.Additional resources +* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-v2-procedure-garbage-collector_about-installing-oc-mirror-v2[Resolving storage cleanup issues in the distribution registry] + +include::modules/oc-mirror-v2-procedure-garbage-collector.adoc[leveloffset=+2] + // procedure for delete feature include::modules/oc-mirror-procedure-delete-v2.adoc[leveloffset=+2] @@ -113,6 +119,7 @@ include::modules/oc-mirror-proxy-support.adoc[leveloffset=+1] [role="_additional-resources"] .Additional resources * xref:../../disconnected/updating/disconnected-update-osus.adoc#updating-disconnected-cluster-osus[Updating a cluster in a disconnected environment using the OpenShift Update Service] +* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-v2-procedure-garbage-collector_about-installing-oc-mirror-v2[Resolving storage cleanup issues in the distribution registry] //operator catalog filtering include::modules/oc-mirror-operator-catalog-filtering.adoc[leveloffset=+1] diff --git a/modules/oc-mirror-v2-procedure-garbage-collector.adoc b/modules/oc-mirror-v2-procedure-garbage-collector.adoc new file mode 100644 index 0000000000..34fc273d51 --- /dev/null +++ b/modules/oc-mirror-v2-procedure-garbage-collector.adoc @@ -0,0 +1,53 @@ +// Module included in the following assemblies: +// +// * disconnected/mirroring/about-installing-oc-mirror-v2.adoc + +:_mod-docs-content-type: PROCEDURE +[id="oc-mirror-v2-procedure-garbage-collector_{context}"] += Resolving storage cleanup issues in the distribution registry + +A known issue in the distribution registry prevents the garbage collector from freeing up storage as expected. This issue does not occur when you use {quay}. + +.Procedure + +* Choose the appropriate method to work around the known issue in the distribution registry: + +** To restart the container registry, run the following command: ++ +[source,terminal] +---- +$ podman restart +---- + +** To disable caching in the registry configuration, perform the following steps: + +... To disable the `blobdescriptor` cache, modify the `/etc/docker/registry/config.yml` file: ++ +[source,yaml] +---- +version: 0.1 +log: + fields: + service: registry +storage: + cache: + blobdescriptor: "" + filesystem: + rootdirectory: /var/lib/registry +http: + addr: :5000 + headers: + X-Content-Type-Options: [nosniff] +health: + storagedriver: + enabled: true + interval: 10s + threshold: 3 +---- + +... To apply the changes, restart the container registry by running the following command: ++ +[source,terminal] +---- +$ podman restart +---- diff --git a/modules/oc-mirror-workflows-delete-v2.adoc b/modules/oc-mirror-workflows-delete-v2.adoc index 8329a7c7a1..9d3893a4ec 100644 --- a/modules/oc-mirror-workflows-delete-v2.adoc +++ b/modules/oc-mirror-workflows-delete-v2.adoc @@ -52,7 +52,10 @@ Consider using the mirror-to-disk and disk-to-mirror workflows to reduce mirrori oc-mirror plugin v2 deletes only the manifests of the images, which does not reduce the storage occupied in the registry. -To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, reducing the storage previously occupied by the deleted blobs. The process for enabling the garbage collector differs depending on your container registry. +To free up storage space from unnecessary images, such as those with deleted manifests, you must enable the garbage collector on your container registry. With the garbage collector enabled, the registry will delete the image blobs that no longer have references to any manifests, reducing the storage previously occupied by the deleted blobs. The process for enabling the garbage collector differs depending on your container registry. + +For more information, see "Resolving storage cleanup issues in the distribution registry". + [IMPORTANT] ====