In diesem Dokument wird beschrieben, wie Sie die Größe von Laufwerken mit asynchroner Replikation anpassen und klonen.
Artifact Registry ist nützlich für die Notfallwiederherstellung mit geringem RPO und mit geringem RTO. Weitere Informationen zur asynchronen Replikation finden Sie unter Asynchrone Replikation.
Beschränkungen
- Primäres und sekundäres Laufwerk müssen dieselbe Größe haben. Wenn Sie die Größe eines primären Laufwerks ändern, das aktiv repliziert wird, wird die Größe des sekundären Laufwerks automatisch angepasst. Wenn die Größe des sekundären Laufwerks nicht automatisch angepasst wird, müssen Sie sie manuell auf die gleiche Größe wie das primäre Laufwerk festlegen. Die Replikation wird pausiert, bis das sekundäre Laufwerk die gleiche Größe wie das primäre Laufwerk hat.
- Sie können keine primären Laufwerke aus einer Konsistenzgruppe klonen. Primäre Laufwerke müssen einzeln geklont werden. Sie können jedoch sekundäre Laufwerke aus einer Konsistenzgruppe klonen.
Hinweise
- Erstellen Sie ein primäres Laufwerk.
- Ein sekundäres Laufwerk erstellen
-
Richten Sie die Authentifizierung ein, falls Sie dies noch nicht getan haben.
Bei der Authentifizierung wird Ihre Identität für den Zugriff auf Google Cloud -Dienste und APIs überprüft. Zum Ausführen von Code oder Beispielen aus einer lokalen Entwicklungsumgebung können Sie sich so bei Compute Engine authentifizieren:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
Installieren Sie die Google Cloud CLI. Initialisieren Sie die Google Cloud CLI nach der Installation mit dem folgenden Befehl:
gcloud initWenn Sie einen externen Identitätsanbieter (IdP) verwenden, müssen Sie sich zuerst mit Ihrer föderierten Identität in der gcloud CLI anmelden.
- Set a default region and zone.
REST
Wenn Sie die REST API-Beispiele auf dieser Seite in einer lokalen Entwicklungsumgebung verwenden möchten, nutzen Sie die Anmeldedaten, die Sie der gcloud CLI bereitstellen.
Installieren Sie die Google Cloud CLI. Initialisieren Sie die Google Cloud CLI nach der Installation mit dem folgenden Befehl:
gcloud initWenn Sie einen externen Identitätsanbieter (IdP) verwenden, müssen Sie sich zuerst mit Ihrer föderierten Identität in der gcloud CLI anmelden.
Weitere Informationen finden Sie in der Dokumentation zur Google Cloud -Authentifizierung unter Für die Verwendung von REST authentifizieren.
Größe von Laufwerken anpassen
Wenn Sie zusätzlichen Speicherplatz oder höhere Leistungsgrenzen benötigen, können Sie die Größe eines primären Laufwerks auf bis zu 64 TB erhöhen. Sie können die Größe eines Laufwerks nicht verringern.
Wenn Sie die Größe eines primären Laufwerks ändern, das aktiv auf ein sekundäres Laufwerk repliziert wird, wird die Größe des sekundären Laufwerks auf die Größe des primären Laufwerks erhöht. Wenn die Größe des sekundären Laufwerks nicht automatisch angepasst wird, müssen Sie sie manuell auf die gleiche Größe wie das primäre Laufwerk festlegen.
Informationen zum Erhöhen der Größe eines Laufwerks finden Sie unter Größe eines Laufwerks erhöhen.
Laufwerke klonen
Sie können ein einzelnes primäres oder sekundäres Laufwerk oder alle sekundären Laufwerke in einer Konsistenzgruppe klonen.
Einzelnes Laufwerk klonen
Klonen Sie ein Artifact Registry-Laufwerk mithilfe der Methoden, die unter Laufwerkklon erstellen beschrieben werden.
Alle Laufwerke in einer Konsistenzgruppe klonen
Bevor Sie sekundäre Laufwerke aus einer Konsistenzgruppe klonen können, müssen Sie eine Konsistenzgruppe in der sekundären Region für die Laufwerke erstellen, die Sie klonen möchten, und dann der Konsistenzgruppe die sekundären Laufwerke hinzufügen.
Klonen Sie alle sekundären Laufwerke in einer Konsistenzgruppe über die Google Cloud Console, die gcloud CLI oder REST.
Console
So klonen Sie alle sekundären Laufwerke in einer Konsistenzgruppe:
Rufen Sie in der Google Cloud Console die Seite Asynchrone Replikation auf.
Klicken Sie auf den Tab Konsistenzgruppen.
Klicken Sie auf den Namen der Konsistenzgruppe, die die sekundären Laufwerke enthält.
Klicken Sie auf Konsistenzgruppe klonen. Das Fenster Konsistenzgruppe klonen wird geöffnet.
Klicken Sie auf Konsistenzgruppe klonen.
gcloud
Klonen Sie alle sekundären Laufwerke in einer Konsistenzgruppe mit dem Befehl
gcloud compute disks bulk create:gcloud compute disks bulk create \ --source-consistency-group-policy=CONSISTENCY_GROUP \ --LOCATION_FLAG=LOCATION
Dabei gilt:
CONSISTENCY_GROUP: die URL der Konsistenzgruppe, die die zu klonenden sekundären Laufwerke enthält. Beispiel:projects/PROJECT/regions/REGION/resourcePolicies/CONSISTENCY_GROUP_NAMELOCATION_FLAG: das Standort-Flag für die Laufwerke in der Konsistenzgruppe. Verwenden Sie für regionale Laufwerke--region. Verwenden Sie für zonale Zonen--zone.LOCATION: die Region oder Zone, in der sich die Laufwerke in der Konsistenzgruppe befinden. Verwenden Sie für regionale Laufwerke die Region. Verwenden Sie für zonale Laufwerke die Zone. Die Klone werden an diesem Speicherort erstellt.
REST
Klonen Sie mit einer der folgenden Methoden alle sekundären Laufwerke in einer Konsistenzgruppe:
Verwenden Sie die Methode
disks.bulkInsert, um zonale Laufwerke in einer Konsistenzgruppe zu klonen:POST https://compute.googleapis.com/compute/v1/projects/CLONE_PROJECT/zones/ZONE/disks/bulkInsert { "sourceConsistencyGroupPolicy": "projects/CONSISTENCY_GROUP_PROJECT/regions/CONSISTENCY_GROUP_REGION/resourcePolicies/CONSISTENCY_GROUP_NAME", }Verwenden Sie die Methode
regionDisks.bulkInsert, um regionale Laufwerke in einer Konsistenzgruppe zu klonen:POST https://compute.googleapis.com/compute/v1/projects/CLONE_PROJECT/regions/REGION/regionDisks/bulkInsert { "sourceConsistencyGroupPolicy": "projects/CONSISTENCY_GROUP_PROJECT/regions/CONSISTENCY_GROUP_REGION/resourcePolicies/CONSISTENCY_GROUP_NAME", }
Dabei gilt:
CLONE_PROJECT: das Projekt, in dem die Laufwerkklone erstellt werden sollen.ZONE: die Zone, in der die Laufwerksklone erstellt werden sollen.REGION: die Region, in der die Laufwerkklone erstellt werden sollen.CONSISTENCY_GROUP_PROJECT: das Projekt, das die Konsistenzgruppe enthält.CONSISTENCY_GROUP_REGION: die Region, in der sich die Konsistenzgruppe befindet.CONSISTENCY_GROUP_NAME: der Name der Konsistenzgruppe.
Nächste Schritte
- Weitere Informationen zum Verwalten von Konsistenzgruppen.
- Weitere Informationen zum Verwalten der Replikation.
- Failover und Failback
- Leistung der asynchronen Replikation überwachen
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-09-04 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis document provides instructions on how to resize and clone Persistent Disk Asynchronous Replication (PD Async Replication) disks, which are utilized for disaster recovery with low Recovery Point Objective (RPO) and Recovery Time Objective (RTO).\u003c/p\u003e\n"],["\u003cp\u003ePrimary and secondary disks in PD Async Replication must maintain the same size; resizing a primary disk triggers automatic resizing of the secondary disk, but manual resizing is necessary if automatic resizing fails and replication will pause until the disks match in size.\u003c/p\u003e\n"],["\u003cp\u003eWhile primary disks cannot be cloned from a consistency group, secondary disks can be cloned individually or in bulk from a consistency group, after having setup the consistency group.\u003c/p\u003e\n"],["\u003cp\u003eResizing a primary disk can only be done to increase its size up to 64 TiB, and the resizing of a disk can be achieved by using the Google cloud console, gcloud CLI, or REST.\u003c/p\u003e\n"],["\u003cp\u003eCloning all disks in a consistency group is done via the gcloud CLI using the \u003ccode\u003egcloud compute disks bulk create\u003c/code\u003e command, or through the REST API by using the \u003ccode\u003edisks.bulkInsert\u003c/code\u003e or \u003ccode\u003eregionDisks.bulkInsert\u003c/code\u003e methods for zonal or regional disks respectively.\u003c/p\u003e\n"]]],[],null,["# Manage disks that use Asynchronous Replication\n\n*** ** * ** ***\n\nThis document describes how to resize and clone Asynchronous Replication\ndisks.\n\nArtifact Registry is useful for low-RPO, low-RTO disaster recovery. To learn\nmore about asynchronous replication, see\n[About Asynchronous Replication](/compute/docs/disks/async-pd/about).\n\nLimitations\n-----------\n\n- Primary and secondary disks must be the same size. If you resize a primary disk that is actively replicating, then the secondary disk is automatically resized. If the secondary disk fails to resize automatically, then you must manually resize it to the same size as the primary disk. Replication is paused until the secondary disk is the same size as the primary disk.\n- You can't clone primary disks from a consistency group. You must clone primary disks individually. However, you can clone secondary disks from a consistency group.\n\nBefore you begin\n----------------\n\n- [Create a primary disk](/compute/docs/disks/async-pd/configure#create_a_primary_disk).\n- [Create a secondary disk](/compute/docs/disks/async-pd/configure#create_a_secondary_disk).\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n ### Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n ### gcloud\n\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n ### REST\n\n\n To use the REST API samples on this page in a local development environment, you use the\n credentials you provide to the gcloud CLI.\n 1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n ```bash\n gcloud init\n ```\n 2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n For more information, see\n [Authenticate for using REST](/docs/authentication/rest)\n in the Google Cloud authentication documentation.\n\nResize disks\n------------\n\nIf you require additional storage space or increased performance limits, you can\nincrease the size of a primary disk to up to 64 TiB.\nYou can't decrease the size of a disk.\n\nWhen you resize a primary disk that is actively replicating to a secondary\ndisk, the secondary disk size is increased to the same size as the primary disk.\nIf the secondary disk fails to resize automatically, then you must manually\nresize it to the same size as the primary disk.\n\nFor information about how to increase the size of a disk, see\n[Increase the size of a disk](/compute/docs/disks/resize-persistent-disk#increase_the_size_of_a_disk).\n\nClone disks\n-----------\n\nYou can clone a single primary or secondary disk, or all secondary disks in a\nconsistency group.\n\n### Clone a single disk\n\nClone a Artifact Registry disk using the methods described in\n[Create a disk clone](/compute/docs/disks/create-disk-from-source#create-clone).\n\n### Clone all disks in a consistency group\n\nBefore you can clone secondary disks from a consistency group, you must\n[create a consistency group](/compute/docs/disks/async-pd/manage-consistency-groups#create_a_consistency_group)\nin the secondary region for the disks that you want to clone, then\n[add the secondary disks to the consistency group](/compute/docs/disks/async-pd/manage-consistency-groups#add_a_disk_to_a_consistency_group).\n\nClone all secondary disks in a consistency group using the Google Cloud console, the\ngcloud CLI, or REST. \n\n### Console\n\nClone all secondary disks in a consistency group by doing the following:\n\n1. In the Google Cloud console, go to the **Asynchronous replication** page.\n\n [Go to Asynchronous replication](https://console.cloud.google.com/compute/asynchronousReplication)\n2. Click the **Consistency groups** tab.\n\n3. Click the name of the consistency group that contains the secondary\n disks.\n\n4. Click **Clone consistency group** . The **Clone consistency group**\n window opens.\n\n5. Click **Clone consistency group**.\n\n### gcloud\n\nClone all secondary disks in a consistency group using the\n[`gcloud compute disks bulk create` command](/sdk/gcloud/reference/compute/disks/bulk/create): \n\n```\ngcloud compute disks bulk create \\\n --source-consistency-group-policy=CONSISTENCY_GROUP \\\n --LOCATION_FLAG=LOCATION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCONSISTENCY_GROUP\u003c/var\u003e: the URL of the consistency group that contains the secondary disks to clone. For example, `projects/`\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e`/regions/`\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`/resourcePolicies/`\u003cvar translate=\"no\"\u003eCONSISTENCY_GROUP_NAME\u003c/var\u003e.\n- \u003cvar translate=\"no\"\u003eLOCATION_FLAG\u003c/var\u003e: the location flag for the disks in the consistency group. For regional disks, use `--region`. For zonal zonal, use `--zone`.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region or zone that the disks in the consistency group are located in. For regional disks, use the region. For zonal disks, use the zone. The clones are created in this location.\n\n### REST\n\nClone all secondary disks in a consistency group using one of the following\nmethods:\n\n- To clone zonal disks in a consistency group, use the\n [`disks.bulkInsert` method](/compute/docs/reference/rest/v1/disks/bulkInsert):\n\n ```\n POST https://compute.googleapis.com/compute/v1/projects/CLONE_PROJECT/zones/ZONE/disks/bulkInsert\n\n {\n \"sourceConsistencyGroupPolicy\": \"projects/CONSISTENCY_GROUP_PROJECT/regions/CONSISTENCY_GROUP_REGION/resourcePolicies/CONSISTENCY_GROUP_NAME\",\n }\n ```\n- To clone regional disks in a consistency group, use the\n [`regionDisks.bulkInsert` method](/compute/docs/reference/rest/v1/regionDisks/bulkInsert):\n\n ```\n POST https://compute.googleapis.com/compute/v1/projects/CLONE_PROJECT/regions/REGION/regionDisks/bulkInsert\n\n {\n \"sourceConsistencyGroupPolicy\": \"projects/CONSISTENCY_GROUP_PROJECT/regions/CONSISTENCY_GROUP_REGION/resourcePolicies/CONSISTENCY_GROUP_NAME\",\n }\n ```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLONE_PROJECT\u003c/var\u003e: the project to create the disk clones in.\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone to create the disk clones in.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region to create the disk clones in.\n- \u003cvar translate=\"no\"\u003eCONSISTENCY_GROUP_PROJECT\u003c/var\u003e: the project that contains the consistency group.\n- \u003cvar translate=\"no\"\u003eCONSISTENCY_GROUP_REGION\u003c/var\u003e: the region where the consistency group is located.\n- \u003cvar translate=\"no\"\u003eCONSISTENCY_GROUP_NAME\u003c/var\u003e: the name of the consistency group.\n\nWhat's next\n-----------\n\n- Learn how to [manage consistency groups](/compute/docs/disks/async-pd/manage-consistency-groups).\n- Learn how to [manage replication](/compute/docs/disks/async-pd/manage-replication#start_replication).\n- Learn how to [failover and failback](/compute/docs/disks/async-pd/failover-failback).\n- Learn how to [monitor Asynchronous Replication performance](/compute/docs/disks/async-pd/performance)."]] -