Skip to content

flasharray: template from snapshot leaves a temporary volume record behind #14856

Todo

Description

@Damans227

problem

Creating a template from a snapshot on a FlashArray pool leaves a temporary volume record in the database forever.

FlashArray cant read a snapshot directly, so CloudStack makes a temporary volume from the snapshot, copies from it, then deletes it. The delete removes the volume on the array, but the database record is never removed. It stays as an Allocated data disk named <snapshot>_<time>.TMP, keeps counting against the pool's allocated space, and shows up in listVolumes. Every template from snapshot adds another one.

When the copy fails, the same code already removes the record. Only the success path misses it. The gap is in StorageSystemDataMotionStrategy.handleCopyAsyncToSecondaryStorageAdaptive.

versions

ACS 4.22.1.1, KVM, FlashArray over FibreChannel, Purity//FA 6.10.6. The code is the same on 4.22 and main.

The steps to reproduce the bug

  1. Create a data volume on a FlashArray pool, attach it to a VM and take a snapshot.
  2. Create a template from the snapshot. It succeeds.
  3. Check for temporary volumes:
> select id,name,state,removed from volumes where name like '%.TMP';
| 45 | fc-vm4_fix15-test_20261125172935_1795627777483.TMP | Allocated | NULL |
| 18 | snap1_1795191776737.TMP                            | Allocated | NULL |

Record 18 is 40 GiB and is still charged to its pool, days after the template was made.

What to do about it?

Remove the temporary volume record after the copy, the same way the failure path already does.

Activity

  1. self-assigned this
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions