Skip to main content

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:

  1. Login to the OCI console.

  2. From the navigation menu, click Compute.

  3. Click Instances.

  4. Click the name of instance to attach the block volume to.

  5. From the Resources menu, click Attached block volumes.

  6. Click Attach block volume.

  7. Select the volume, attachment type and access details.

  8. 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