Updating a disk

After you create a disk, you can:

Changing the name and description of a disk

To change the name and description of a disk:

  1. Select the folder that the disk belongs to.
  2. Select Yandex Compute Cloud.
  3. On the Virtual machines page, go to the Disks tab.
  4. Click image next to the disk and select Edit.
  5. Change the name and description of the disk.
  6. Click Save changes.

Compute Cloud will start the operation to change the disk.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To change the name and description of a disk:

  1. View the description of the CLI's disk change command:

    $ yc compute disk update --help
    
  2. Request a list of available disks:

    $ yc compute disk list
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    |          ID          |     NAME     |    SIZE     |     ZONE      | STATUS |     INSTANCE IDS     |       DESCRIPTION       |
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    | a7lqgbt0bb9s40tifuhc | first-disk   | 20401094656 | ru-central1-a | READY  | a7lcvu28njbhnkcteb5n |                         |
    | a7lv5j5hm1p1hppprga7 | second-disk  | 21474836480 | ru-central1-a | READY  |                      |                         |
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    
  3. Select the ID or NAME of the required disk (for example, first-disk).

  4. Specify the name and description in the disk change command:

    $ yc compute disk update first-disk \
        --new-name updated-disk \
        --description "Updated disk via CLI"
    

    Compute Cloud will start the operation to change the disk.

You can change the name and description of the disk using the update API method.

To request the list of available disks, use the list method.

Increasing the disk size

Disk size can be increased only if the disk is not connected to a running VM. To increase disk size, make sure that the VM is stopped.

To increase the disk size:

  1. Select the folder that the disk belongs to.

  2. Select Yandex Compute Cloud.

  3. On the Virtual machine page, stop the VM (see Stop).

  4. Wait until the VM's status changes to STOPPED.

  5. Go to the Disks tab.

  6. Click image next to the disk and select Edit.

  7. Increase the disk size.

  8. Click Save changes.

    Compute Cloud will start the operation to change the disk size.

  9. When the operation finishes, go back to the Virtual machines page and restart the VM.

If you don't have the Yandex.Cloud command line interface yet, install it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id flag.

To increase the disk size:

  1. View the description of the CLI's disk change command:

    $ yc compute disk update --help
    
  2. Request a list of available disks:

    $ yc compute disk list
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    |          ID          |     NAME     |    SIZE     |     ZONE      | STATUS |     INSTANCE IDS     |       DESCRIPTION       |
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    | a7lqgbt0bb9s40tifuhc | first-disk   | 20401094656 | ru-central1-a | READY  | a7lcvu28njbhnkcteb5n |                         |
    | a7lv5j5hm1p1hppprga7 | second-disk  | 21474836480 | ru-central1-a | READY  |                      |                         |
    +----------------------+--------------+-------------+---------------+--------+----------------------+-------------------------+
    
  3. Stop the VM with the disk you want to update. To do this, select the ID of the VM:

    $ yc compute instance stop --id a7lcvu28njbhnkcteb5n
    
  4. Select the ID or NAME of the required disk (for example, first-disk).

  5. Specify the size (for example, 32 GB) in the disk change command:

    $ yc compute disk update first-disk \
        --size 32
    

    Compute Cloud will start the operation to change the disk size.

  6. Start the VM:

    $ yc compute instance start --id a7lcvu28njbhnkcteb5n
    

You can change the disk size using the update API method.

To request the list of available disks, use the list method.

To stop or start the VM, use the stop and start methods for the Instance resource.