Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
      • Creating an empty disk
      • Creating an empty disk with a large block
      • Creating a non-replicated disk
      • Creating a high-performance SSD
      • Recovering a disk from a snapshot
      • Recovering a disk from an image
    • Viewing service resource operations
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Creating a disk
  3. Creating an empty disk with a large block

Creating an empty disk with a large block

Written by
Yandex Cloud
Improved by
Danila N.
Updated at May 5, 2025

Disks consist of blocks. By default, the block size is 4 KB for all new disks. When creating a disk, you can set the block size between 4 KB and 128 KB.

For network disks, the maximum disk size depends on the block size. The size of a newly created disk must be a multiple of 4 MB. The possible disk and block sizes are as follows:

Block size Maximum disk size
4 KB 8 TB
8 KB 16 TB
16 KB 32 TB
32 KB 64 TB
64 KB 128 TB
128 KB 256 TB

For non-replicated SSDs and ultra high-speed network SSD storages with three replicas, you can select any block size for any disk size. The disk size must be a multiple of 93 GB.

You cannot change the block size after the disk is created.

Alert

The selected physical block size may affect disk performance.

Typically, the logical block size is 512 bytes. Although the guest OS tries to align data I/O with the physical block size, this may not always be feasible. When the software runs numerous read and write operations that are smaller than the physical block, these operations can reach the disk subsystem. When it comes to read operations, this means reading more data than actually requested, i.e., at least one physical block. Write operations are even more complex, as to write data smaller than the physical block, the system first reads the entire physical block, then modifies specific bytes, and, finally, rewrites this block (this is known as read-modify-write operation). As long as such an operation is not aligned to the physical block size, it may require reading and rewriting two physical blocks. This can turn one logical write into two read and two write operations at the disk subsystem level. This extra load will not show up in the guest OS metrics but will affect performance and will be considered when assessing how close the load is to the disk limits.

This is why we recommend choosing large block sizes only when your software uses large requests (at least equal to the physical block size) when working with the file system or disk.

Management console
CLI
Terraform
API

See Creating an empty disk.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI commands for creating disks:

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

    yc compute disk create \
      --name big-disk \
      --block-size 8K \
      --size 40G \
      --description "my 8k blocksize disk via yc"
    

    This command will create a 40 GB disk with 8 KB block size, named big-disk and described as my 8k blocksize disk via yc.

    The disk naming requirements are as follows:

    • It must be from 2 to 63 characters long.
    • It may contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  3. Get a list of disks in the default folder:

    yc compute disk list
    

    Result:

    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    |          ID          |     NAME     |    SIZE     |       ZONE        | STATUS |     INSTANCE IDS     | PLACEMENT GROUP | DESCRIPTION |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    | a7lqgbt0bb9s******** | first-disk   | 20401094656 |   ru-central1-a   | READY  | a7lcvu28njbh******** |                 |             |
    | a7lv5j5hm1p1******** | second-disk  | 21474836480 |   ru-central1-a   | READY  |                      |                 |             |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    

    Get the same list with more details in YAML format:

    yc compute disk list --format yaml
    

    Result:

    - id: fhmm0br99mig********
       folder_id: b1gb9jeqoior********
       created_at: "2021-01-11T09:35:05Z"
       name: big-disk
       description: 8k blocksize disk
       type_id: network-hdd
       zone_id: ru-central1-a
       size: "42949672960"
       block_size: "8192"
       status: READY
       disk_placement_policy: {}
    

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

To create an empty disk:

  1. Define the parameters of the yandex_compute_disk resource in the configuration file.

    Here is an example of the configuration file structure:

    resource "yandex_compute_disk" "empty-disk" {
      name       = "empty-disk"
      type       = "network-hdd"
      zone       = "<availability_zone>"
      size       = <disk_size>
      block_size = <block_size>
    }
    

    Where:

    • name: Disk name. The name format is as follows:

      • It must be from 2 to 63 characters long.
      • It may contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • type: Disk type.

    • zone: Availability zone. The availability zone for your disk must match the zone of the placement group where you want to create it. We recommend creating disks in the ru-central1-a or ru-central1-b availability zone.

    • size: Disk size in GB. The maximum disk size depends on the specified block size.

    • block_size: Block size in bytes (minimum storage unit on the disk). By default, the block size is 4 KB for all new disks; however, this is insufficient for disks larger than 8 TB. For more information, see Creating an empty disk with a large block.

    For more information about the yandex_compute_disk resource, see the relevant provider documentation.

  2. Make sure the configuration files are correct.

    1. In the command line, go to the directory where you created the configuration file.

    2. Run a check using this command:

      terraform plan
      

    If the configuration is correct, the terminal will display a list of resources to create and their parameters. If the configuration contains any errors, Terraform will point them out.

  3. Deploy the cloud resources.

    1. If the configuration does not contain any errors, run this command:

      terraform apply
      
    2. Confirm creating the resources.

    All the resources you need will then be created in the specified folder. You can check the new resources and their settings using the management console or this CLI command:

    yc compute disk list
    

Use the create REST API method for the Disk resource or the DiskService/Create gRPC API call.

Was the article helpful?

Previous
Creating an empty disk
Next
Creating a non-replicated disk
© 2025 Direct Cursus Technology L.L.C.