Copy disk

Uploading and configuring a disk image is a time consuming process. When configuring an Access Gateway cluster, a disk is required per instance. Okta recommends the best practice of creating and uploading a disk(primary) and then replicating that disk as many times as required using snapshots (copies for cluster members).

During this task you will:

  • Create a snapshot
  • Create a disk from a snapshot
  • Repeat the disk creation as required for your Access Gateway cluster

Ensure that you have run the az disk revoke-access command or its UI equivalent, before replicating the disk. Failure to revoke prior access to the disk can cause commands to time out or fail due to the disk being unavailable.

Create a snapshot

  1. Sign in or return to the Microsoft Azure Portal

  2. From the menu, select All Services and search for Disks.

    Alternatively, select Disks from the favorites list.

  3. Select the disk you created in the prior step.

    The Disk page for the disk opens.

  4. From the menu, select Create snapshot.

  5. Enter a name for the snapshot.

    Okta recommends a name that represents the version of Access Gateway the disk is based. For example, Okta-AccessGateway-2020.5.0-Snapshot.

  6. Choose a Resource group for the snapshot.

    Okta recommends you use the Resource Group used to hold the parent disk.

  7. For Account type, select Standard (HDD).

  8. Click Create. A snapshot of the disk is created.

    It can take a few minutes for the snapshot process to complete.

Create a disk copy

  1. Select Create a resource in the left menu.

  2. In the search box, enter managed disk and then select Managed Disks from the list.

    The Managed Disks page opens.

  3. Click Create.

  4. Enter a name for the new disk.

    Okta recommends using a name that represents the disks intended use. For example, Okta-AccessGateway-2021.5.0-Admin, Okta-AccessGateway-2021.5.0-Worker1, Okta-AccessGateway-2021.5.0-Worker2, and so on.

  5. Choose a Resource group for the disk.

    Okta recommends you use the Resource Group used to hold the parent disk.

  6. For Account type, select either Standard (HDD) or Premium (SSD) storage.

    Okta recommends you use the Premium storage for disk and Standard storage for snapshots.

  7. In Source type, ensure Snapshot is selected.

  8. In the Source snapshot drop-down box, select the snapshot you created earlier.

  1. Sign in or return to the Microsoft Azure command line interface.

    az login

  2. Use the az disk list command to list the details of available disks.

    az disk list --resource-group <resource-group>

    In this example, <resource-group> is the name of the previously created resource group.

    If you replace <resource-group> with AccessGateway, the following result appears:

    { . . . "encryptionSettingsCollection": null,"hyperVgeneration": "V1", "id": "/subscriptions/8bc.../resourceGroups/AccessGateway. . ./disks/AG2020-05-00", "location": "eastus", . . . }

  3. Use the az snapshot create command to create a snapshot of the existing disk.

    Copy
    az snapshot create --resource-group <resource-group> \
    --source <diskid> \
    --name <disk-name>

    • <resource-group> is the name of the previously created resource group.
    • <disk-id> is the value of the ID field from the az disk list.
    • <disk-name> is the name of the snapshot you're creating.

    If you replace <resource-group> with AccessGateway, and <disk-name> with AG2020-05.0, the following result appears:

    { . . . encryptionSettingsCollection": null, hyperVgeneration": "V1", "id": "/subscriptions/8bc9effd-.../snapshots/. . . .snapshot", . . . }

  4. Use the az disk create command to create a disk from an existing snapshot.

    Copy
    az disk create --resource-group <resource-group> \
    --name <disk-name> --source <snapshot-id>

    • <resource-group> is the name of the previously created resource group.
    • <snapshot-id> is the value of the ID field from the az snapshot create command. Use az snapshot list --resource-group <resource-group> to view a list of the snapshots.
    • <disk-name> is the name of the disk you're creating.

    If you replace <resource-group> with AccessGateway, <disk-name> with AG2020-05.0, and <snapshot-id> with AccessGateway, the following result appears:

    { "creationData": { "createOption": "Copy", . . . "id": "/subscriptions/8bc9effd-...e/disks/AccessGateway. . .-Admin", "location":"eastus" . . . }

Repeat as required to create the required number of disks for the intended cluster size.

Okta recommends that you reserve the original disk for expanding the cluster instead of using it for any member.