[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],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)."]]