Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to check storage availability and resize the Artifact Registry storage if more capacity is required.
Follow these instructions if, during the upgrade process, there is not enough free storage
space in the Artifact Registry, which results in operation failures.
Before you begin
To check storage availability and resize the Artifact Registry storage, you must have the necessary identity and access roles:
System Artifact Registry Debugger: has read and write access to all Harbor resources. Ask your Security Admin to grant you the System Artifact Registry Debugger (sar-debugger) cluster role.
Check the storage usage of the Artifact Registry in the org infrastructure cluster
You can check the current Artifact Registry storage usage in the org infrastructure
cluster to determine next steps for storage allocation.
Work through the following steps:
Export the kubeconfig path for the org infrastructure cluster Artifact Registry:
exportORG_INFRA_KUBECONFIG=KUBECONFIG_FILE_PATH
Replace KUBECONFIG_FILE_PATH with the path to the kubeconfig file for the org infrastructure cluster.
Set the existing Artifact Registry pod as an environment variable:
Find the mounted path /var/lib/registry in the output to view the Artifact Registry storage usage. The following example output shows the Artifact Registry
storage usage is 40% and there is 85G of free space:
Verify that the Avail size for the /var/lib/registry file system is
larger than the size of the image file to be uploaded. If necessary, you
can resize this storage by following the steps in the next section.
Apply the new storage size
You can resize the storage of the Artifact Registry, if necessary.
Work through the following steps:
Create a new environment variable and set it to the new persistent volume
claim (PVC) storage size:
STORAGE_SIZE=400G
Apply the new storage size to the Artifact Registry:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Resize Artifact Registry storage\n\nThis page describes how to check storage availability and resize the Artifact Registry storage if more capacity is required.\n\nFollow these instructions if, during the upgrade process, there is not enough free storage\nspace in the Artifact Registry, which results in operation failures.\n\nBefore you begin\n----------------\n\nTo check storage availability and resize the Artifact Registry storage, you must have the necessary identity and access roles:\n\n- System Artifact Registry Debugger: has read and write access to all Harbor resources. Ask your Security Admin to grant you the System Artifact Registry Debugger (`sar-debugger`) cluster role.\n\nCheck the storage usage of the Artifact Registry in the org infrastructure cluster\n----------------------------------------------------------------------------------\n\nYou can check the current Artifact Registry storage usage in the org infrastructure\ncluster to determine next steps for storage allocation.\nWork through the following steps:\n\n1. Export the `kubeconfig` path for the org infrastructure cluster Artifact Registry:\n\n export ORG_INFRA_KUBECONFIG=\u003cvar translate=\"no\"\u003eKUBECONFIG_FILE_PATH\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eKUBECONFIG_FILE_PATH\u003c/var\u003e with the path to the `kubeconfig` file for the org infrastructure cluster.\n2. Set the existing Artifact Registry pod as an environment variable:\n\n pod=$(kubectl --kubeconfig $ORG_INFRA_KUBECONFIG get pods -n harbor-system -l goharbor.io/operator-controller=registry -o name)\n\n3. Print the output for the Artifact Registry storage usage:\n\n kubectl --kubeconfig $ORG_INFRA_KUBECONFIG exec $pod -n harbor-system \\\n -c registry -- df -h\n\n Find the mounted path `/var/lib/registry` in the output to view the Artifact Registry storage usage. The following example output shows the Artifact Registry\n storage usage is 40% and there is 85G of free space: \n\n Filesystem Size Used Avail Use% Mounted on\n overlay 484G 43G 441G 9% /\n tmpfs 64M 0 64M 0% /dev\n tmpfs 24G 0 24G 0% /sys/fs/cgroup\n /dev/sda1 484G 43G 441G 9% /storage\n tmpfs 43G 12K 43G 1% /harbor_cust_cert/ca.crt\n shm 64M 0 64M 0% /dev/shm\n tmpfs 43G 4.0K 43G 1% /etc/registry/auth\n /dev/mapper/3600a09807770457a795d5452356a3345 147G 54G 85G 40% /var/lib/registry\n tmpfs 24G 0 24G 0% /proc/acpi\n tmpfs 24G 0 24G 0% /proc/scsi\n tmpfs 24G 0 24G 0% /sys/firmware\n\n Verify that the `Avail` size for the `/var/lib/registry` file system is\n larger than the size of the image file to be uploaded. If necessary, you\n can resize this storage by following the steps in the next section.\n\nApply the new storage size\n--------------------------\n\nYou can resize the storage of the Artifact Registry, if necessary.\nWork through the following steps:\n\n1. Create a new environment variable and set it to the new persistent volume\n claim (PVC) storage size:\n\n STORAGE_SIZE=400G\n\n2. Apply the new storage size to the Artifact Registry:\n\n kubectl --kubeconfig $ORG_INFRA_KUBECONFIG patch Persistentvolumeclaim/harbor-registry \\\n -n harbor-system --type=merge \\\n -p '{\"spec\": {\"resources\": {\"requests\": {\"storage\": \"'$STORAGE_SIZE'\"}}}}'\n\n3. Restart the Artifact Registry pod to implement the new storage size update:\n\n kubectl --kubeconfig $ORG_INFRA_KUBECONFIG rollout restart deployment \\\n -n harbor-system harbor-harbor-harbor-registry\n\n4. Verify your usage amount and capacity increase by\n [checking the Artifact Registry](#check-artifact-storage)."]]