Cleaning up docker storage used to run a container on a host, vg-docker

Solution Verified - Updated -

Issue

  • BZ1292845.
  • Cleaning up docker space.
  • Deleting a large number of images and they are deleted successfully from etcd but not from registry storage.
  • Manually deleting an image with oc delete image <sha256:image-id> only removes the image from etcd, but not from the registry’s storage."
  • What is the best way to clean up images and resources.
  • When examining our docker storage pool via the vgs or vgdisplay commands, it shows no space available.
  • Running below commands did not free up any space.

    oc adm prune deployments --keep-complete=5 --confirm
    oc adm prune builds --orphans --keep-failed=1 -keep-complete=5 --confirm
    oc adm prune images --keep-tag-revisions=3 --keep-younger-than=400m --confirm
    
  • Can not figure out how to clean up the actual imagefs.
  • Docker space (docker vg) is constantly building up and even the cleanup playbook placed in ansible/blob/master/playbooks/adhoc/docker_storage_cleanup/docker_storage_cleanup.yml does not fix it.

Environment

  • Red Hat OpenShift Container Platform 3.6+.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content