Creating an ultra high-speed network storage with three replicas (SSD)
You can create an ultra high-speed network storage with three replicas (SSD), which is a high-performance SSD offering the same speed as a non-replicated SSD, plus redundancy.
The disk size must be a multiple of 93 GB.
-
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:
- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
Add a description for the disk, if required.
-
Select the availability zone the disk will reside in.
-
Select
SSD IOas 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.
To create an encrypted disk, you need the
kms.keys.userrole or higher.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.
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, you will irrevocably lose access to the data. For details, see Destroying key versions.
-
Click Create disk.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the CLI command for creating disks:
yc compute disk create --help -
To create a high-performance disk named
ssd-io-disk, run this command:yc compute disk create \ --name ssd-io-disk \ --zone ru-central1-a \ --type network-ssd-io-m3 \ --size 93G \ --kms-key-id <key_ID>Where:
-
--name: Disk name. -
--zone: Availability zone. -
--type: Disk type. -
--size: Disk size. -
--kms-key-id: ID of the KMS symmetric key to create an encrypted disk. This is an optional parameter.To create an encrypted disk, you need the
kms.keys.userrole or higher.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.
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, you will irrevocably lose access to the data. For details, see Destroying key versions.
Result:
id: a7li08c1fd8l******** folder_id: aoerb349fdhb******** created_at: "2024-11-25T21:22:20Z" name: ssd-io-disk type_id: network-ssd-io-m3 zone_id: ru-central1-a size: "99857989632" 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******** -
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To create a high-performance disk, do the following:
-
In the Terraform configuration file, describe the resources you want to create:
resource "yandex_compute_disk" "empty-fast-disk" { name = "<disk_name>" type = "network-ssd-io-m3" zone = "<availability_zone>" size = 93 block_size = 4096 kms_key_id = <key_ID> }Where:
-
name: Disk name. Follow these naming requirements:- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
type: Disk type,ssd-io-m3. -
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 theru-central1-aorru-central1-bavailability zone. -
size: Disk size in GB. This must be a multiple of 93 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. Learn more in Creating an empty disk with a large block. -
kms_key_id: ID of the KMS symmetric key to create an encrypted disk. This is an optional parameter.To create an encrypted disk, you need the
kms.keys.userrole or higher.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.
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, you will irrevocably lose access to the data. For details, see Destroying key versions.
For more information about the
yandex_compute_diskresource, see the relevant provider documentation. -
-
Create the resources:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.
-
Apply the changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check the new resources 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.