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. - Select Compute Cloud.
- In the left-hand panel, select
Placement groups. - Go to the Non-replicated disk placement groups tab.
- Select the placement group to remove a disk from.
- Go to the List of 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 documentation on the Terraform
If you don't have Terraform, install it and configure the Yandex Cloud provider.
To remove a non-replicated disk created with Terraform from a placement group:
-
Open the Terraform configuration file and delete the fragment describing the non-replicated disk.
Sample non-replicated disk description in the 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, go to the directory with the Terraform configuration file.
-
Check the configuration using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
The terminal will display a list of resources with parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
into the terminal and press Enter.You can check the update using the management console
or this CLI command:yc compute disk-placement-group get <disk_placement_group_name>