[Yandex Cloud documentation](../../../index.md) > [Yandex Compute Cloud](../../index.md) > [Step-by-step guides](../index.md) > Creating a disk > Creating a non-replicated disk

# Creating a non-replicated disk


You can create a stand-alone [non-replicated](../../concepts/disk.md#nr-disks) disk or add such a disk to a [disk placement group](../../concepts/disk-placement-group.md).

The [disk](../../concepts/disk.md) size must be a multiple of 93 GB.

## Creating a stand-alone non-replicated disk {#nr-disk}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) where you want to create a disk.
  1. Navigate to **Compute Cloud**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/hard-drive.svg) **Disks**.
  1. Click **Create disk**.
  1. Enter a name for the disk. The naming requirements are as follows:

     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.

  1. Add a description for the disk, if required.
  1. Select the [availability zone](../../../overview/concepts/geo-scope.md) the disk will reside in.
  1. Select `Non-replicated SSD` as the disk type.
  1. Select the required block size.
  1. Specify the required disk size.
  1. Optionally, under **Encryption**:
     
       * Select **Encrypted disk**.
       * In the **KMS key** field, select the [key](../../../kms/concepts/key.md) you created earlier. To [create](../../../kms/operations/key.md#create) a new key, click **Create**.
     
       To create an encrypted disk, you need the `kms.keys.user` [role](../../../kms/security/index.md#kms-keys-user) or higher.
     
       {% note warning %}
       
       You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.
       
       {% endnote %}
       
       If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.
       
       {% note alert %}
       
       If you destroy the key or its [version](../../../kms/concepts/version.md) used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see [Destroying key version](../../../kms/concepts/version.md#version-distruct).
       
       {% endnote %}
  1. Optionally, select or create a [schedule](../../concepts/snapshot-schedule.md) for automatic disk [snapshots](../../concepts/snapshot.md). For more information on schedule settings, see [this guide](../snapshot-control/create-schedule.md).

     When creating a disk, you can only select a single snapshot schedule. After the disk is created, you can add a few more schedules, if required, by following [this guide](../disk-control/configure-schedule.md#add-schedule).
  1. Click **Create disk**.

- CLI {#cli}

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the [CLI](../../../cli/index.md) command for creating disks:

     ```bash
     yc compute disk create --help
     ```

  1. To create a non-replicated disk named `nr-disk`, run this command:

     ```bash
     yc compute disk create \
       --name nr-disk \
       --zone <availability_zone> \
       --type network-ssd-nonreplicated \
       --size 93 \
       --kms-key-id <key_ID>
     ```

       Where:
       * `--name`: Disk name.
       * `--zone`: [Availability zone](../../../overview/concepts/geo-scope.md) of the new disk. If the availability zone is not set in the [CLI profile](../../../cli/concepts/core-properties.md) by default, the parameter is required.
       * `--type`: Disk type.
       * `--size`: Disk size.
       * `--kms-key-id`: ID of the [KMS symmetric key](../../../kms/concepts/key.md) to create an encrypted disk. This is an optional setting.

         To create an encrypted disk, you need the `kms.keys.user` [role](../../../kms/security/index.md#kms-keys-user) or higher.
         
         {% note warning %}
         
         You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.
         
         {% endnote %}

         If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.
         
         {% note alert %}
         
         If you destroy the key or its [version](../../../kms/concepts/version.md) used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see [Destroying key version](../../../kms/concepts/version.md#version-distruct).
         
         {% endnote %}

     Result:

     ```text
     done (1s)
     id: epdb2517b970********
     folder_id: b1g7gvsi89m3********
     ...
     block_size: "4096"
     status: READY
     disk_placement_policy: {}
     hardware_generation:
       legacy_features:
         pci_topology: PCI_TOPOLOGY_V1
     kms_key:
       key_id: abjbaqdga6hs********
       version_id: abj295dgqnlp********
     ```

- Terraform {#tf}

  With [Terraform](https://www.terraform.io/), you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.
  
  Terraform is distributed under the [Business Source License](https://github.com/hashicorp/terraform/blob/main/LICENSE). The [Yandex Cloud provider for Terraform](https://github.com/yandex-cloud/terraform-provider-yandex) is distributed under the [MPL-2.0](https://www.mozilla.org/en-US/MPL/2.0/) license.
  
  For more information about the provider resources, see the guides on the [Terraform](https://www.terraform.io/docs/providers/yandex/index.html) website or [its mirror](../../../terraform/index.md).

  If you do not have Terraform yet, [install it and configure the Yandex Cloud provider](../../../tutorials/infrastructure-management/terraform-quickstart.md#install-terraform).
  
  
  To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), [authenticate](../../../terraform/authentication.md) using the appropriate method.

  1. In the configuration file, define the non-replicated disk parameters:

     ```hcl
     resource "yandex_compute_disk" "nr" {
       name       = "<non-replicated_disk_name>"
       size       = <non-replicated_disk_size>
       block_size = <block_size>
       type       = "network-ssd-nonreplicated"
       zone       = "<availability_zone>"
       kms_key_id = "<KMS_key_ID>"
     }
     ```

     Where:
     * `name`: Non-replicated disk name. The naming requirements are as follows:

       * Length: between 3 and 63 characters.
       * It can only contain lowercase Latin letters, numbers, and hyphens.
       * It must start with a letter and cannot end with a hyphen.

     * `size`: Non-replicated disk size, which must be a multiple of 93 GB.
     * `block_size`: Block size in bytes (minimum storage unit on the disk). The maximum disk size depends on the specified block size. 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](empty-disk-blocksize.md).
     * `type`: Disk type. Specify `network-ssd-nonreplicated` to create a non-replicated disk.
     * `zone`: [Availability zone](../../../overview/concepts/geo-scope.md).
     * `kms_key_id`: ID of the [KMS symmetric key](../../../kms/concepts/key.md) to create an [encrypted](../../concepts/encryption.md) disk. This is an optional setting.

        To create an encrypted disk, you need the `kms.keys.user` [role](../../../kms/security/index.md#kms-keys-user) or higher.

        {% note warning %}
        
        You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.
        
        {% endnote %}

        If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.
        
        {% note alert %}
        
        If you destroy the key or its [version](../../../kms/concepts/version.md) used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see [Destroying key version](../../../kms/concepts/version.md#version-distruct).
        
        {% endnote %}

     For more information about the `yandex_compute_disk` resource properties in Terraform, see [this provider guide](../../../terraform/resources/compute_disk.md#example-usage---non-replicated-disk).
  1. Make sure the configuration files are correct.
     1. In the terminal, navigate to the directory where you created your configuration file.
     1. Run a check using this command:

        ```bash
        terraform plan
        ```

     If the configuration is correct, the terminal will display a list of the resources and their settings. Otherwise, Terraform will show any detected errors.
  1. Deploy the cloud resources.
     1. If the configuration is correct, run this command:

        ```bash
        terraform apply
        ```

     1. Confirm creating the resources by typing `yes` and pressing **Enter**.

        This will create all the resources you need in the specified [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder). You can check the new resources and their settings using the [management console](https://console.yandex.cloud) or this [CLI](../../../cli/index.md) command:

        ```bash
        yc compute disk list
        ```

- API {#api}

  Use the [create](../../api-ref/Disk/create.md) REST API method for the [Disk](../../api-ref/Disk/index.md) resource or the [DiskService/Create](../../api-ref/grpc/Disk/create.md) gRPC API call.

{% endlist %}

## Creating a non-replicated disk in a placement group {#nr-disk-in-group}

You can only create a disk in an existing disk placement group.

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder where you want to create a disk.
  1. Navigate to **Compute Cloud**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/hard-drive.svg) **Disks**.
  1. Click **Create disk**.
  1. Enter a name for the disk. The naming requirements are as follows:

     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.

  1. Add a description for the disk, if required.
  1. Select the availability zone the disk will reside in.

     The availability zone for your disk must match the zone of the placement group where you want to create it.
  1. Select `Non-replicated SSD` as the disk type.
  1. Select a disk placement group.

      If you select a [partition placement](../../concepts/disk-placement-group.md#partition) group, specify the number of the partition you want to add the disk to.
  1. Specify the required disk size.
  1. Optionally, select or create a [schedule](../../concepts/snapshot-schedule.md) for automatic disk snapshots. For more information on schedule settings, see [this guide](../snapshot-control/create-schedule.md).

     If you want to set another schedule, you can [add](../disk-control/configure-schedule.md#add-schedule) it after the disk is created.
  1. Click **Create disk**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

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

     ```bash
     yc compute disk create --help
     ```

  1. In a placement group, create a non-replicated disk in the default folder using one of these strategies:
     * [Spread placement](../../concepts/disk-placement-group.md#spread):

       ```bash
       yc compute disk create \
         --name <disk_name> \
         --zone <availability_zone> \
         --type network-ssd-nonreplicated \
         --size <disk_size> \
         --disk-placement-group-name <placement_group_name> \
         --kms-key-id <key_ID>
       ```

       Where:
       * `--name`: Disk name.
       * `--zone`: [Availability zone](../../../overview/concepts/geo-scope.md) of the new disk. The disk availability zone must match the placement group zone. If the availability zone is not set in the [CLI profile](../../../cli/concepts/core-properties.md) by default, the parameter is required.
       * `--type`: Disk type.
       * `--size`: Disk size.
       * `--disk-placement-group-name`: Placement group name.
       * `--kms-key-id`: ID of the [KMS symmetric key](../../../kms/concepts/key.md) to create an encrypted disk. This is an optional setting.

         To create an encrypted disk, you need the `kms.keys.user` [role](../../../kms/security/index.md#kms-keys-user) or higher.
         
         {% note warning %}
         
         You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.
         
         {% endnote %}

         If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.
         
         {% note alert %}
         
         If you destroy the key or its [version](../../../kms/concepts/version.md) used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see [Destroying key version](../../../kms/concepts/version.md#version-distruct).
         
         {% endnote %}

       Result:

       ```text
       done (1s)
       id: epdtncic35ru********
       folder_id: b1g7gvsi89m3********
       ...
       status: READY
       disk_placement_policy:
         placement_group_id: epdn946ilslh********
       hardware_generation:
         legacy_features:
           pci_topology: PCI_TOPOLOGY_V1
       kms_key:
         key_id: abjbaqdga6hs********
         version_id: abj295dgqnlp********
       ```

     * [Partition placement](../../concepts/disk-placement-group.md#partition):

       ```bash
       yc compute disk create \
         --name <disk_name> \
         --zone <availability_zone> \
         --type network-ssd-nonreplicated \
         --size <disk_size> \
         --disk-placement-group-name <placement_group_name> \
         --disk-placement-group-partition <partition_number>
       ```

       Where:
       * `--name`: Disk name.
       * `--zone`: [Availability zone](../../../overview/concepts/geo-scope.md) of the new disk. The disk availability zone must match the placement group zone. If the availability zone is not set in the [CLI profile](../../../cli/concepts/core-properties.md) by default, the parameter is required.
       * `--type`: Disk type.
       * `--size`: Disk size.
       * `--disk-placement-group-name`: Placement group name.
       * `--disk-placement-group-partition`: Partition number in the placement group.
       * `--kms-key-id`: ID of the [KMS symmetric key](../../../kms/concepts/key.md) to create an encrypted disk. This is an optional setting.

         To create an encrypted disk, you need the `kms.keys.user` [role](../../../kms/security/index.md#kms-keys-user) or higher.
         
         {% note warning %}
         
         You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.
         
         {% endnote %}

         If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.
         
         {% note alert %}
         
         If you destroy the key or its [version](../../../kms/concepts/version.md) used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see [Destroying key version](../../../kms/concepts/version.md#version-distruct).
         
         {% endnote %}

       Result:

       ```text
       done (1s)
       id: epdtncic35ru********
       folder_id: b1g7gvsi89m3********
       ...
       disk_placement_policy:
         placement_group_id: epdn946ilslh********
         placement_group_partition: 2
       kms_key:
         key_id: abjbaqdga6hs********
         version_id: abj295dgqnlp********
       ```


- API {#api}

  Use the [create](../../api-ref/Disk/create.md) REST API method for the [Disk](../../api-ref/Disk/index.md) resource or the [DiskService/Create](../../api-ref/grpc/Disk/create.md) gRPC API call.

{% endlist %}


#### Useful links {#see-also}

* [Creating a disk snapshot schedule](../snapshot-control/create-schedule.md)