Creating an empty disk

    You can create an empty disk of the specified size.

    1. In the management console, select the folder where you want to create a disk.

    2. Click on the Yandex Compute Cloud tile.

    3. On the Virtual machines page, go to the Disks tab.

    4. Click Create disk.

    5. Enter the disk name.

      The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum name length is 63 characters.

    6. If necessary, add an arbitrary description of the disk.

    7. Specify the necessary disk size.

    8. Click Save disk.

    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.

    1. See the description of the CLI's create disk commands:

      $ yc compute disk create --help
      
    2. Create a disk in the default folder:

      $ yc compute disk create \
          --name first-disk \
          --size 10 \
          --description "my first disk via yc"
      

      This command creates a 10 GB disk with the name first-disk and description my first disk via yc.

      The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum name length is 63 characters.

    3. Get a list of disks in the default folder:

      $ yc compute disk list
      +----------------------+-------------+-------------+---------------+--------+------------------------+
      |          ID          |     NAME    |    SIZE     |     ZONE      | STATUS |      DESCRIPTION       |
      +----------------------+-------------+-------------+---------------+--------+------------------------+
      | fhm4aq4hvq5g3nepvt9b | first-disk  | 10737418240 | ru-central1-a | READY  | my first disk via CLI  |
      | fhmo6rdqg5folrc3lsaf | second-disk | 8589934592  | ru-central1-a | READY  | my second disk via CLI |
      +----------------------+-------------+-------------+---------------+--------+------------------------+
      

      Get the same list with more details in YAML format:

      $ yc compute disk list --format yaml
      
      - id: fhm4aq4hvq5g3nepvt9b
          folder_id: b1gm3og7ei7aegv8i73m
          created_at: "2018-10-29T07:43:06Z"
          name: first-disk
          description: my first disk via yc
          type_id: network-hdd
          zone_id: ru-central1-a
          size: "10737418240"
          status: READY
      - id: fhmo6rdqg5folrc3lsaf
          folder_id: b1gm3og7ei7aegv8i73m
          created_at: "2018-10-29T07:33:04Z"
          name: second-disk
          description: my second disk via yc
          type_id: network-hdd
          zone_id: ru-central1-a
          size: "8589934592"
          product_ids:
          - f2en2dtd08b5la74mlde
          status: READY
          source_image_id: fdvcl0b1no2hjb423igi
          instance_ids:
          - fhm5b617fjnj44ovhcun