Decommissioning and deleting Block Storage for Classic volumes

Before you delete a Block Storage for Classic volume, complete the pre-deletion checklist to confirm that the volume is no longer in use. Deleting a volume is permanent: after the reclaim period expires, the data cannot be recovered.

Pre-deletion checklist

Work through each item before you submit a cancellation request. Skipping steps is the most common cause of accidental data loss.

1. Confirm ownership and purpose

Check the Notes field on the volume details page and confirm with the team that originally ordered the volume. The volume name alone does not identify the workload or the data it contains. For more information, see Viewing Block Storage for Classic volume details in the consoleViewing Block Storage for Classic volume details from the CLI.

2. Understand what "authorized hosts" means

An authorized host can mount the volume. An empty authorized-host list is not sufficient evidence that a volume is unused or safe to delete. If authorized hosts are present, confirm with the host owners that the volume is no longer required before you proceed with deletion.

3. Verify the authorized-host list under the correct user

The portal, the CLI (ibmcloud sl block access-list), and the SoftLayer API (SoftLayer_Network_Storage::getObject with allowedVirtualGuests, allowedHardware, allowedSubnets, or allowedIpAddresses) return only the hosts the calling user has Classic infrastructure device permission to see. A user without permission to view a server receives HTTP 200 with an empty list, not an error. An empty list does not confirm that the volume has no authorized hosts.

Always run the authorization check as the account owner, or as a user with access to all devices. To grant all-device access, go to Manage > Access (IAM) > Users, open the user, then under Classic infrastructure > Devices, select all device types and enable Automatically grant access when new devices are added. For more information, see Managing classic infrastructure access.

If you are scripting the authorization check, treat an empty host list as unverified, not unused. Log the HTTP response body so that a permission-filtered result is distinguishable from a genuinely empty result.

For more information, see Viewing the list of hosts that are authorized to access a Block Storage for Classic volume in the console Viewing the list of hosts that are authorized to access a Block Storage for Classic volume from the CLIViewing the list of hosts that are authorized to access a Block Storage for Classic volume with Terraform.

4. Check actual data usage on the host

Block Storage for Classic volumes do not report bytes used. The bytes_used column in ibmcloud sl block volume-list is not a reliable usage indicator for block volumes. To determine whether data is present on a block volume, inspect the volume from the authorized host:

  • Run multipath -ll and lsblk to confirm the device is visible.
  • Check mount points and file system usage with df -h or equivalent commands.
  • Confirm with the application or database team that no live workload depends on the volume.

5. Unmount and disconnect the volume from every host

Before you revoke authorization or cancel the volume, unmount the volume from all operating systems and log out of the iSCSI target. Canceling a mounted volume can cause data corruption or stale sessions on the host.

Follow the instructions for your operating system to safely unmount and disconnect:

6. Revoke all host authorizations

After the volume is unmounted from every host, revoke access for all authorized hosts. For more information, see Revoking a host's access to Block Storage for Classic in the console Revoking access from the CLI.

7. Cancel active replication and remove dependent duplicates

Active replicas and dependent duplicate volumes block reclamation of the original volume. Cancel any replication partnerships and remove any dependent duplicates before you request deletion. For more information, see Replication and Creating a duplicate volume.

8. Understand the reclaim timeline

After a cancellation request, the volume is reclaimed approximately 24 hours later (for immediate cancellation) or on the next billing anniversary date. After the volume is reclaimed, the volume and all of its data are permanently destroyed and cannot be recovered. To stop a pending cancellation, open a Support case before the reclaim runs.

Delete a storage volume in the console

If you no longer need a specific volume, you can delete it at any time.

  1. Click Storage > Block Storage for Classic.

  2. Select the volume to be canceled, click Actions, and select Delete Block Storage for Classic.

  3. Confirm whether you want to delete the volume immediately or on the anniversary date of when the volume was provisioned.

    If you select the option to delete the volume on its anniversary date, you can void the cancellation request before its anniversary date.

  4. Click the Acknowledgment checkbox and click Delete.

Delete a storage volume from the CLI

If you no longer need a specific volume, you can delete it at any time.

Delete a storage volume from the IBM Cloud CLI

Use the following command to cancel the storage. The following example command cancels the volume 12345678 immediately, instead of on the anniversary date.

ibmcloud sl volume-cancel --immediate 12345678

For more information about all of the parameters that are available for this command, see ibmcloud sl block volume-cancel.

Delete a storage volume from the SLCLI

Use the following command in SLCLI to cancel the storage.

$ slcli block volume-cancel --help
Usage: slcli block volume-cancel [OPTIONS] VOLUME_ID

Options:
  --reason TEXT  An optional reason for cancellation
  --immediate    Cancels the block storage volume immediately instead of on
                 the billing anniversary
  -h, --help     Show this message and exit.

Delete a storage volume with the API

Use the cancel_volume method in the SoftLayer Python API client. Specify the volume_id and whether to cancel immediately or on the billing anniversary date (immediate=True or immediate=False). Optionally, provide a reason for the cancellation.

Delete a storage volume from Terraform

The preferred way to delete a block volume that is managed by Terraform is to remove its ibm_storage_block resource block from your configuration and run terraform apply. Terraform detects the missing resource and destroys it, keeping your configuration and state in sync.

  1. Open your Terraform configuration file and delete the ibm_storage_block resource block for the volume.

  2. Run terraform apply to apply the change.

    terraform apply
    

    Terraform displays a plan that shows the resource is marked for destruction. Confirm the plan to proceed.

If you want to destroy a specific volume without editing your configuration, you can use terraform destroy --target instead. The following example targets a single resource by its Terraform address.

terraform destroy --target ibm_storage_block.example

Using this method preserves the resource block in your configuration, which creates a drift between your config and your infrastructure state. Remove the resource block from your configuration after you confirm that the volume is deleted.

For more information, see terraform apply and terraform destroy.