Skip to content

Orphaned S3 blobs and stale user index entries after space deletion and recreation — no cleanup path available #2985

Description

@giovanni-cm

Environment:

  • OpenCloud version: 7.1.0 (rolling), upgraded from 6.1.0
  • Storage backend: decomposedS3 (MinIO)
  • Search backend: Bleve + Apache Tika
  • Deployment: Docker Compose (official opencloud-compose repo)

Description:

A project space ("END Docs") was created and populated with ~200 GB of files. Due to incorrect file timestamps, the space was deleted and recreated, and the files were re-uploaded with correct timestamps. The new space works correctly and is fully accessible.
The space is owned by a dedicated user ("Archivio Old Files") whose sole purpose is to manage this single archive space. The space is shared read-only with other users, so they can retrieve archived documents without the ability to edit, modify, or delete them.

However, the old deleted space left behind:

  • ~200 GiB of orphaned blobs in the S3 bucket (under a UUID prefix that no longer corresponds to any visible space)
  • Stale references to the old space UUID in multiple user index files (/opt/opencloud/data/storage/users/indexes/by-user-id/*.mpk)
  • A stale entry in /opt/opencloud/data/storage/users/spaces/ with no .space metadata file inside

What was tried:

  • opencloud storage-users trash-bin purge-expired — ran successfully but did not remove the orphaned data
  • Checked admin UI with "show disabled spaces" enabled — the old space does not appear
  • Checked all users' trash bins — empty
  • The old space UUID (b6c7e517-a7d7-4b61-875b-03fb714bc806) is confirmed absent from the UI but present in S3 with ~200 GiB / ~56,000 objects, and referenced in user index .mpk files

Current state:

  • Live space UUID: 45858f44-896e-41bd-bb1f-db7d438bf6dd — fully functional, 216.9 GB, visible in admin UI
  • Orphaned UUID: b6c7e517-a7d7-4b61-875b-03fb714bc806 — 200 GiB in S3, stale index references, not visible anywhere in UI, no trash entry, no space metadata on disk

Why manual S3 deletion is not safe:

Deleting the S3 prefix directly would leave the stale .mpk index entries pointing to non-existent objects, with unknown consequences for affected users.

Request:

Is there a supported procedure or CLI command to fully purge an orphaned space (S3 blobs + index entries) that is no longer visible in the UI and cannot be accessed through normal admin workflows? If not, this seems like a gap in the opencloud storage-users tooling that would benefit from a dedicated spaces purge or spaces cleanup subcommand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions