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 and select Non-replicated disk placement group.
-
Enter a name for the placement group. The 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.
-
Provide a description for the disk placement group, if required.
-
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 CLI yet, install and initialize it.
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.
-
See the description of the CLI command for creating a disk placement group:
yc compute disk-placement-group create --help
-
Create a disk placement group in the default folder with one of the following 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 the created 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.