Creating a disk placement group
To create a placement group for non-replicated disks:
-
In the management console
, select the folder where you want to create a disk placement group. -
Select Compute Cloud.
-
In the left-hand panel, select
Placement groups. -
Go to the Non-replicated disk placement groups tab.
-
In the top-right corner, click Create → Non-replicated disk placement group.
-
Enter a name for the placement group. 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.
-
If required, add a group description.
-
Specify the availability zone.
-
Select a placement strategy: spread or partition.
If you select the partition placement strategy, specify the number of partitions for non-replicated disks.
-
Click Create.
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.
-
View the description of the CLI command to create a disk placement group:
yc compute disk-placement-group create --help
-
Create a placement group in the default folder with one of the placement strategies:
-
yc compute disk-placement-group create \ --name <disk_placement_group_name> \ --zone <availability_zone> \ --strategy SPREAD
Where:
--name
: Disk placement group name--zone
: Availability zone--strategy
: Placement strategy
-
yc compute disk-placement-group create \ --name <disk_placement_group_name> \ --zone <availability_zone> \ --strategy PARTITION \ --partition-count <number_of_partitions>
Where:
--name
: Disk placement group name--zone
: Availability zone--strategy
: Placement strategy--partition-count
: Number of partitions, two to five
-
-
Get a list of disk placement groups in the default folder:
yc compute disk-placement-group list
Result:
+----------------------+---------------------+-------------------+--------+---------------+ | ID | NAME | ZONE | STATUS | STRATEGY | +----------------------+---------------------+-------------------+--------+---------------+ | epd3oalmkmbp******** | drbasic-partition-1 | ru-central1-b | READY | PARTITION [3] | | epdn7r7co1v4******** | drbasic-spread-2 | ru-central1-b | READY | SPREAD | +----------------------+---------------------+-------------------+--------+---------------+
-
Get information about your disk placement group by specifying its name:
yc compute disk-placement-group get \ --name <placement_group_name>
Result:
id: epd4sug6kesk******** folder_id: w3qrbj9swoty******** created_at: "2021-03-23T12:49:59Z" name: first-group zone_id: ru-central1-b status: READY spread_placement_strategy: {}
Use the create REST API method for the DiskPlacementGroup resource or the DiskPlacementGroupService/Create gRPC API call.