Resizing Volumes

The Block Volume service lets you expand the size of block volumes and boot volumes. Use one of the following options to increase the size of your volumes:

  • Expand an existing volume in place with online resizing.

  • Restore from a volume backup to a larger volume.

  • Clone an existing volume to a new, larger volume.

  • Expand an existing volume in place with offline resizing.

You cannot decrease the size of a volume.

For more conceptual information, refer to the Block Volume Storage Overview chapter in the Oracle Private Cloud Appliance Concepts Guide

Online Volume Resizing

With online resizing, you can expand the volume size without detaching the volume from an instance. Online resizing requires you to rescan the disk and extend the partition.

Online Block Volume Resizing

Using the Compute Web UI

  1. In the navigation menu, under Block Storage, click Block Volumes.

  2. Select the appropriate compartment.

  3. For the volume you plan to resize, click the Actions icon (three dots), and select Edit.

  4. Change the size:

    • Size (in GBs): You can keep the size the same, or increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

  5. Click Save Changes.

  6. Rescan the disk.

    For details, consult the OS documentation for the OS type and version running in the instance.

  7. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Using the OCI CLI

  1. Gather the information that you need to run the command:

    • Volume OCID (oci bv volume list)

  2. Run the update block volume command.

    Syntax:

    oci bv volume update --volume-id volume_OCID --size-in-gbs size_in_GBs

    The size_in_GBs value is the size of the block volume. You can increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

    Example:

    oci bv volume update   \
    --volume-id ocid1.volume.….….….uniqueID   \
    --size-in-gbs 72{
      "data": {
        "auto-tuned-vpus-per-gb": null,
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.compartment.….….….uniqueID",
        "defined-tags": {},
        "display-name": "clone-w-policy",
        "freeform-tags": {},
        "id": "ocid1.volume.….….….uniqueID",
        "is-auto-tune-enabled": null,
        "is-hydrated": null,
        "kms-key-id": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 72,
        "size-in-mbs": 71424,
        "source-details": {
          "id": "ocid1.volume.….….….uniqueID",
          "type": "volume"
        },
        "system-tags": null,
        "time-created": "2021-07-02T20:48:20+00:00",
        "volume-group-id": null,
        "vpus-per-gb": 0
      },
      "etag": "58851b71-236d-4d99-8175-b27835d6b34f"
    }
  3. Rescan the disk.

    For details, consult the OS documentation for the OS type and version running in the instance.

  4. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Online Boot Volume Resizing

Using theCompute Web UI

  1. Boot Volume: In the navigation menu, under Block Storage, click Boot Volumes.

  2. Select the appropriate compartment.

  3. For the volume you plan to resize, click the Actions icon (three dots), and select Edit.

  4. Change the size:

    • Size (in GBs): You can keep the size the same, or increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

  5. Click Save Changes.

  6. Rescan the disk.

    For details, consult the OS documentation for the OS type and version running in the instance.

  7. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Using the OCI CLI

  1. Gather the information that you need to run the command:

    • Boot volume OCID (oci bv boot-volume list)

  2. Run the update boot volume command.

    Syntax:

    oci bv boot-volume update --boot-volume-id volume_OCID --size-in-gbs size_in_GBs

    The size_in_GBs value is the size of the boot volume. You can increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

    Example:

    oci bv boot-volume update   \
    --boot-volume-id ocid1.bootvolume.….….….uniqueID   \
    --size-in-gbs 1024
    
    {
      "data": {
        "auto-tuned-vpus-per-gb": null,
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.tenancy.….….….uniqueID",
        "defined-tags": {},
        "display-name": "MyInstance(Boot Volume)",
        "freeform-tags": {},
        "id": "ocid1.bootvolume.….….….uniqueID",
        "image-id": "ocid1.image.….….….uniqueID",
        "is-auto-tune-enabled": null,
        "is-hydrated": null,
        "kms-key-id": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 1024,
        "source-details": null,
        "system-tags": null,
        "time-created": "2021-08-10T20:14:03.053300+00:00",
        "volume-group-id": null,
        "vpus-per-gb": 0
      },
      "etag": "bd0677e3-c542-45f3-bf04-c473b184c795"
    }
  3. Rescan the disk.

    For details, consult the OS documentation for the OS type and version running in the instance.

  4. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Offline Volume Resizing

With offline resizing, you detach the volume from an instance before you expand the volume size. When the volume is resized and reattached, you need to extend the partition, but you do not need to rescan the disk.

Considerations When Resizing an Offline Volume

Whenever you detach and reattach volumes, there are complexities and risks for both UNIX based and Microsoft Windows instances. Keep the following points in mind when resizing volumes:

  • Before you resize a volume, create a full backup of the volume.

  • When you reattach a volume to an instance after resizing, if you are not using consistent device paths, or if the instance does not support consistent device paths, device order and path might change. If you are using a tool such as Logical Volume Manager (LVM), you might need to fix the device mappings.

Offline Block Volume Resizing

Using the Compute Web UI

  1. Detach the block volume.

    See Detaching a Block Volume.

  2. In the navigation menu, click Block Storage, then click Block Volumes.

  3. Select the appropriate compartment.

  4. For the volume you plan to resize, click the Actions icon (three dots), and select Edit.

  5. Change the size:

    • Size (in GBs): You can keep the size the same, or increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

  6. Click Save Changes.

  7. Reattach the volume.

    See Attaching a Volume

  8. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Using the OCI CLI

  1. Detach the block volume.

    See Detaching a Block Volume.

  2. Gather the information that you need to run the command:

    • Volume OCID (oci bv volume list)

  3. Run the volume update command.

    Syntax (entered on a single line):

    oci bv volume update --volume-id volume_OCID --size-in-gbs size_in_GBs

    The size_in_GBs value is the size of the block volume. You can increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

    Example:

    oci bv volume update   \
    --volume-id ocid1.volume.….….….uniqueID   \
    --size-in-gbs 72{
      "data": {
        "auto-tuned-vpus-per-gb": null,
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.compartment.….….….uniqueID",
        "defined-tags": {},
        "display-name": "clone-w-policy",
        "freeform-tags": {},
        "id": "ocid1.volume.….….….uniqueID",
        "is-auto-tune-enabled": null,
        "is-hydrated": null,
        "kms-key-id": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 72,
        "size-in-mbs": 71424,
        "source-details": {
          "id": "ocid1.volume.….….….uniqueID",
          "type": "volume"
        },
        "system-tags": null,
        "time-created": "2021-07-02T20:48:20+00:00",
        "volume-group-id": null,
        "vpus-per-gb": 0
      },
      "etag": "58851b71-236d-4d99-8175-b27835d6b34f"
    }
  4. Reattach the volume.

    See Attaching a Volume.

  5. Extend the partition.

    For details, consult the OS documentation for the OS type and version running in the instance.

Offline Boot Volume Resizing

Using the Compute Web UI

  1. Stop the instance.

    See Stopping, Starting, and Resetting an Instance.

  2. Detach the boot volume.

    See Detaching a Boot Volume.

  3. In the navigation menu, under Block Storage, click Boot Volumes.

  4. Select the appropriate compartment.

  5. For the volume you plan to resize, click the Actions icon (three dots), and select Edit.

  6. Change the size:

    • Size (in GBs): You can keep the size the same, or increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

  7. Click Save Changes.

  8. Attach the boot volume to a second instance as a data volume.

    See Attaching a Volume.

  9. Extend the partition and grow the file system.

    For details, consult the OS documentation for the OS type and version running in the instance.

  10. Detach the data volume.

    See Detaching a Block Volume.

  11. Reattach the boot volume.

    See Reattaching a Boot Volume.

  12. Restart the instance.

    See Stopping, Starting, and Resetting an Instance.

Using the OCI CLI

  1. Stop the instance.

    See Stopping, Starting, and Resetting an Instance.

  2. Detach the boot volume.

    See Detaching a Boot Volume.

  3. Gather the information that you need to run the command:

    • Boot volume OCID (oci bv boot-volume list)

  4. Run the boot volume update command.

    Syntax (entered on a single line):

    oci bv boot-volume update --boot-volume-id volume_OCID --size-in-gbs size_in_GBs

    The size_in_GBs value is the size of the boot volume. You can increment the size. You cannot decrease the size. The value must be between 50 GB and 32 TB and specified in 1 GB increments.

    Example:

    oci bv boot-volume update   \
    --boot-volume-id ocid1.bootvolume.….….….uniqueID   \
    --size-in-gbs 1024
    
    {
      "data": {
        "auto-tuned-vpus-per-gb": null,
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.tenancy.….….….uniqueID",
        "defined-tags": {},
        "display-name": "MyInstance(Boot Volume)",
        "freeform-tags": {},
        "id": "ocid1.bootvolume.….….….uniqueID",
        "image-id": "ocid1.image.….….….uniqueID",
        "is-auto-tune-enabled": null,
        "is-hydrated": null,
        "kms-key-id": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 1024,
        "source-details": null,
        "system-tags": null,
        "time-created": "2021-08-10T20:14:03.053300+00:00",
        "volume-group-id": null,
        "vpus-per-gb": 0
      },
      "etag": "bd0677e3-c542-45f3-bf04-c473b184c795"
    }
  5. Attach the boot volume to a second instance as a data volume.

    See Attaching a Volume.

  6. Extend the partition and grow the file system.

    For details, consult the OS documentation for the OS type and version running in the instance.

  7. Detach the data volume.

    See Detaching a Block Volume.

  8. Reattach the boot volume.

    See Reattaching a Boot Volume.

  9. Restart the instance.

    See Stopping, Starting, and Resetting an Instance.