Creating a non-replicated disk
You can create a stand-alone non-replicated disk or add such a disk to a disk placement group.
The disk size must be a multiple of 93 GB.
Create a separate non-replicated disk
-
In the management console
, select the folder where you want to create a disk. -
Select Compute Cloud.
-
In the left-hand panel, select
Disks. -
Click Create disk.
-
Enter a name for the disk. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
Add a description for the disk, if required.
-
Select the availability zone the disk will be in.
-
Select
Non-replicated SSD
as the disk type. -
Select the required block size.
-
Specify the required disk size.
-
Optionally, under Encryption:
- Select Encrypted disk.
- In the KMS key field, select the key you created earlier. To create a new key, click Create new key.
Warning
You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption.
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.
Alert
If you destroy the key or its version used to encrypt a disk, image, or snapshot, access to the data will be irrevocably lost. Learn more in Destroying key versions.
-
If required, select a schedule to create snapshots automatically or set up a new schedule. For more information about setting up schedules, see this guide.
When creating a disk, you can select only one snapshot schedule. After the disk is created, you can add a few more schedules, if required, by following this guide.
-
Click Create 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
parameter.
-
See the description of the CLI create disk commands:
yc compute disk create --help
-
To create a non-replicated disk named
nr-disk
, run this command:yc compute disk create \ --name nr-disk \ --type network-ssd-nonreplicated \ --size 93
Result:
done (1s) id: epdb2517b970******** folder_id: b1g7gvsi89m3******** ... block_size: "4096" status: READY disk_placement_policy: {}
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the documentation on the Terraform
If you don't have Terraform, install it and configure the Yandex Cloud provider.
-
In the configuration file, describe the non-replicated disk's parameters:
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>" }
Where:
-
name
: Non-replicated disk name. The naming requirements are as follows:- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
size
: The non-replicated disk size must be a multiple of 93 GB. -
block_size
: Block size in bytes (minimum data storage volume). The maximum disk size depends on the specified block size. By default, block size is 4 KB for all new disks; however, this is not enough for disks larger than 8 TB. For more information, see Creating an empty disk with a large block. -
type
: Disk type. Specifynetwork-ssd-nonreplicated
to create a non-replicated disk. -
zone
: Availability zone.
For more information about the
yandex_compute_disk
resource parameters in Terraform, see the provider documentation . -
-
Make sure the configuration files are correct.
-
In the command line, go to the folder where you created the configuration file.
-
Run a check using this command:
terraform plan
If the configuration is described correctly, the terminal will display a list of created resources and their parameters. If the configuration contains any errors, Terraform will point them out.
-
-
Deploy cloud resources.
-
If the configuration does not contain any errors, run this command:
terraform apply
-
Confirm creating the resources: type
yes
in the terminal and press Enter.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.
Create a non-replicated disk in a placement group
You can only create a disk in an existing disk placement group.
-
In the management console
, select the folder where you want to create a disk. -
Select Compute Cloud.
-
In the left-hand panel, select
Disks. -
Click Create disk.
-
Enter a name for the disk. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
Add a description for the disk, if required.
-
Select the availability zone the disk will be in.
The availability zone for a disk must be the same as that of the placement group where you want to create the disk.
-
Select
Non-replicated SSD
as the disk type. -
Select a disk placement group.
If you select a group with the partition placement, specify the number of the partition you want to add the disk to.
-
Specify the required disk size.
-
If required, select a schedule for automatic snapshot creation, or set up a new schedule. For more information about setting up schedules, see this guide.
If you want to set another schedule, you can add it after the disk is created.
-
Click Create disk.
If you do not have the Yandex Cloud command line interface yet, install and initialize 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
parameter.
-
See the description of the CLI create disk command:
yc compute disk create --help
-
In a placement group, create a non-replicated disk in the default folder using one of the strategies:
-
yc compute disk create \ --name <disk_name> \ --type network-ssd-nonreplicated \ --size <disk_size> \ --disk-placement-group-name <placement_group_name>
Where:
--name
: Disk name.--type
: Disk type.--size
: Disk size.--disk-placement-group-name
: Placement group name.
Result:
done (1s) id: epdtncic35ru******** folder_id: b1g7gvsi89m3******** ... status: READY disk_placement_policy: placement_group_id: epdn946ilslh********
-
yc compute disk create \ --name <disk_name> \ --type network-ssd-nonreplicated \ --size <disk_size> \ --disk-placement-group-name <placement_group_name> \ --disk-placement-group-partition <partition_number>
Where:
--name
: Disk name.--type
: Disk type.--size
: Disk size.--disk-placement-group-name
: Placement group name.--disk-placement-group-partition
: Partition number in the placement group.
Result:
done (1s) id: epdtncic35ru******** folder_id: b1g7gvsi89m3******** ... disk_placement_policy: placement_group_id: epdn946ilslh******** placement_group_partition: 2
-
Use the create REST API method for the Disk resource or the DiskService/Create gRPC API call.