lacework-global-209
Block Volume is not attached (Automated)
Description
Alert when a block volume is not attached to its associated instance. Ensure attachment of the volume. Detaching a block volume decouples the volume from its associated instance and could affect data availability, from business-critical data to point-in-time copies of volumes as backups.
Remediation
From Console:
- Login to the OCI console.
- From the navigation menu, click Compute.
- Click Instances.
- Click the name of instance to attach the block volume to.
- From the Resources menu, click Attached block volumes.
- Click Attach block volume.
- Select the volume, attachment type and access details.
- Click Attach.
From CLI:
Execute the following command to return compute instance IDs and display names:
oci compute instance list --compartment-id <compartment_id> --query 'data[].{id:id,name:"display-name"}
Execute the following command to attach a block volume to a compute instance:
oci compute volume-attachment attach --instance-id <instance_id> --volume-id <volume_id> --type <iscsi|paravirtualized>
References
https://docs.oracle.com/en-us/iaas/cloud-guard/using/detect-recipes.htm#detect-recipes-ref-config__BLOCK_VOLUME_NOT_ATTACHED
https://docs.oracle.com/en-us/iaas/Content/GSG/Tasks/addingstorage.htm
https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.30.1/oci_cli_docs/cmdref/compute/volume-attachment/attach.html