Removing a disk from a placement group
Remove a non-replicated disk from a placement group. You can then permanently delete the disk or add it back to the placement group.
- In the management console
, select the folder where you want to remove a disk from a placement group. - Navigate to Compute Cloud.
- In the left-hand panel, select
Placement groups. - Navigate to the Non-replicated disk placement groups tab.
- Select the placement group to remove a disk from.
- Go to the Disks panel.
- To the right of the name of the disk to remove, click
and select Delete. - In the window that opens, click Delete.
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 manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To remove a non-replicated disk created with Terraform from a placement group:
-
Open the Terraform configuration file and delete the section specifying the non-replicated disk.
Example of specifying a non-replicated disk in Terraform configuration
... resource "yandex_compute_disk" "nr" { name = "non-replicated-disk-name" size = 93 block_size = 4096 type = "network-ssd-nonreplicated" zone = "ru-central1-b" disk_placement_policy { disk_placement_group_id = yandex_compute_disk_placement_group.this.id } } resource "yandex_compute_disk_placement_group" "this" { zone = "ru-central1-b" } ... -
In the command line, navigate to the directory with the Terraform configuration file.
-
Check the configuration using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check the updates using the management console
or this CLI command:yc compute disk-placement-group get <disk_placement_group_name>